Attributes are inherited.
But SerializableAtt ribute has Inherited=false attribute and cannot be
inherited:
[ComVisible(true ), AttributeUsage( AttributeTarget s.Delegate |
AttributeTarget s.Enum | AttributeTarget s.Struct |
AttributeTarget s.Class, Inherited=false )]
public sealed class SerializableAtt ribute : 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.publi c.dotnet.langua ges.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