PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Serialization Namespace / Serialization­Services Class / Serialization­Services Methods / Serialization­Services.​Get­Serialization­Exception Method / Serialization­Services.​Get­Serialization­Exception Method (Member­Info)

SerializationServices.GetSerializationException Method (MemberInfo)

Checks whether a given MethodInfo, ConstructorInfo, FieldInfo, PropertyInfo, EventInfo or Type can be safely serialized.

Namespace:  PostSharp.Serialization
Assembly:  PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
public static PortableSerializationException GetSerializationException(
	MemberInfo memberInfo


Type: System.Reflection.MemberInfo
The declaration to be serialized.

Return Value

Type: PortableSerializationException
null if memberInfo can be safely serialized, otherwise an exception where the text describes the reason why the declaration is not serializable.
See Also