FieldInfo.IsNotSerialized Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value indicating whether this field has the NotSerialized attribute.

Namespace:   System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

abstract IsNotSerialized : bool with get
override IsNotSerialized : bool with get

Property Value

Type: System.Boolean

true if the field has the NotSerialized attribute set; otherwise, false.

The IsNotSerialized property returns true when the field is marked with the FieldAttributes.NotSerialized flag. When this flag is set on a field, it indicates that the field does not have to be serialized when the type is remoted.

The following example gets the field information of the fields of MyClass, determines if the fields can be serialized, and displays the results.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: