brgdotnet
asked on
How to tell if a class is Serialized
Hello Experts,
I am maintaining some C# and VB.net code. I know that by default classes and members are non-serializable; that they can be made serializeable by adding the SerializableAttribute.
I also know that if class B inherits from a serialized class, "class A", that class B is not serialized by default. So here is my question. Is there a way in C# or VB.net to prove that a class is currently not serialized?
I am maintaining some C# and VB.net code. I know that by default classes and members are non-serializable; that they can be made serializeable by adding the SerializableAttribute.
I also know that if class B inherits from a serialized class, "class A", that class B is not serialized by default. So here is my question. Is there a way in C# or VB.net to prove that a class is currently not serialized?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Migquel read this article. By default they are not serialized, you have to place an attribute on them to declare them as serializedL
https://docs.microsoft.com/en-us/dotnet/visual-basic/misc/bc30772
https://docs.microsoft.com/en-us/dotnet/visual-basic/misc/bc30772
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Marking a class as "serializable" does nothing to the class itself.