oop - Is serializable attribute needed in concrete C# class? -


in c#, consider have generic class , concrete class

[serializable] public class genericuser { ...  [serializable] public class concreteuser : genericuser { ... 

is necessary mark concreteuser [serializable] or inheritance take care of it?

inherited set false [attributeusage] of serializableattribute, yes, need set on concrete class.

see http://msdn.microsoft.com/en-us/library/system.serializableattribute.aspx more information.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -