NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

nonserialized

Prevents a field or property from being serialized.

[nonserialized]

Applies To

Field and property declarations.

Remarks

nonserialized is a single-use attribute. nonserialized is an alias for System.Serialization.NonSerializedAttribute.

If a class has the serializable attribute, the base class library serialization services will, by default, serialize all the fields and properties of the class. In some cases, a field or property should not be serialized, either for performance or correctness reasons (for example, it does not make sense to serialize a file handle). The nonserialized attribute placed on a field or property prevents it from being serialized.

Example

See the example for the serializable attribute.

See Also

C# Attributes | serializable