System.Runtime.Serialization.FormatterServices.GetSerializableMembers Method

Gets all the serializable members for a class of the specified Type and in the provided System.Runtime.Serialization.StreamingContext.

Syntax

public static System.Reflection.MemberInfo[] GetSerializableMembers (Type type, StreamingContext context)

Parameters

type
The type being serialized or cloned.
context
The context where the serialization occurs.

Returns

An array of type System.Reflection.MemberInfo of the non-transient, non-static members.

Remarks

Generally, the serializable members of a class are the non-transient, non-static members such as fields and properties. To be included, properties must have both a getter and a setter. A class that implements System.Runtime.Serialization.ISerializable or has a serialization surrogate does not have to serialize all these members, or can serialize additional members.

Currently, you do not need to do anything different unless context has the System.Runtime.Serialization.StreamingContextStates value StreamingContextStates.Clone set.

Requirements

Namespace: System.Runtime.Serialization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0