Silverlight: Is there a way to indicate to the DataContractSerializer that a class is non-Serializable?

307 Views Asked by At

Is there a way to indicate to the DataContractSerializer that a class is non-Serializable?

1

There are 1 best solutions below

0
On

You could add a method that throws an exception saying "don't serialize me" and decorate it with the OnSerializingAttribute.