Attributes are inherited.
But SerializableAttribute has Inherited=false attribute and cannot be
inherited:
[ComVisible(true), AttributeUsage(AttributeTargets.Delegate |
AttributeTargets.Enum | AttributeTargets.Struct |
AttributeTargets.Class, Inherited=false)]
public sealed class SerializableAttribute : Attribute
{
...
}
So B needs this one also.
WBR, Alex Meleta
Blog:
http://devkids.blogspot.com
-----Original Message-----
From: Dan Holmes [mailto:da*******@bigfoot.com]
Posted At: Donnerstag, 26. April 2007 22:15
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: are attributes inherited
Subject: are attributes inherited
Say i have:
[Serializable]
public class A
{
}
public class B : A
{
}
does B need the serializable attribute as well?
dan