SerializationInfo.SetType(Type) 方法

定义

设置要序列化的对象的 Type

public:
 void SetType(Type ^ type);
public void SetType (Type type);
member this.SetType : Type -> unit
Public Sub SetType (type As Type)

参数

type
Type

要序列化的对象的 Type

例外

type 参数为 null

注解

负责 Formatter 在将 实例传递给 之前设置 TypeSerializationInfoGetObjectData实例的 。 但是,想要为其对象发送代理的用户需要更改此 SerializationInfo 实例表示的类型。 SetType使用 方法等效于设置 FullTypeNameAssemblyName

适用于