NonSerializedAttribute

NonSerializedAttribute CF 1.0

System (mscorlib.dll) sealed class

This attribute lets you mark properties of fields in a class as nonserializable, so that they are ignored during a serialization operation. Typical examples of nonserializable data include pointers, handles, and other data structures that can't be re-created during deserialization.

By default, a class is not eligible for serialization unless it implements System.Runtime.Serialization.ISerializable or is marked with a SerializableAttribute . Once a class is marked as serializable, you must mark all fields or properties that are not to be serialized with a NonSerializedAttribute .

 public sealed class  NonSerializedAttribute  : Attribute {  // Public Constructors  public  NonSerializedAttribute  ( ); } 

Hierarchy

Object Attribute NonSerializedAttribute

Valid On

Field



C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net