SerializationInfo SerializationInfo SerializationInfo Constructors

定义

重载

SerializationInfo(Type, IFormatterConverter) SerializationInfo(Type, IFormatterConverter) SerializationInfo(Type, IFormatterConverter)

创建 SerializationInfo 类的新实例。Creates a new instance of the SerializationInfo class.

SerializationInfo(Type, IFormatterConverter, Boolean) SerializationInfo(Type, IFormatterConverter, Boolean) SerializationInfo(Type, IFormatterConverter, Boolean)

初始化 SerializationInfo 类的新实例。Initializes a new instance of the SerializationInfo class.

SerializationInfo(Type, IFormatterConverter) SerializationInfo(Type, IFormatterConverter) SerializationInfo(Type, IFormatterConverter)

重要

此 API 不符合 CLS。

创建 SerializationInfo 类的新实例。Creates a new instance of the SerializationInfo class.

public:
 SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo

参数

type
Type Type Type

要序列化的对象的 TypeThe Type of the object to serialize.

converter
IFormatterConverter IFormatterConverter IFormatterConverter

在反序列化过程中使用的 IFormatterConverterThe IFormatterConverter used during deserialization.

异常

typeconverternulltype or converter is null.

注解

IFormatterConverter作为传递converter参数将数据从内部表示形式转换为窗体请求的用户。The IFormatterConverter passed as the converter parameter converts data from its internal representation to the form the user requested. 中的数据的内部表示形式SerializationInfo取决于创建它的格式化程序。The internal representation of the data within the SerializationInfo depends on the formatter that created it.

SerializationInfo(Type, IFormatterConverter, Boolean) SerializationInfo(Type, IFormatterConverter, Boolean) SerializationInfo(Type, IFormatterConverter, Boolean)

重要

此 API 不符合 CLS。

初始化 SerializationInfo 类的新实例。Initializes a new instance of the SerializationInfo class.

public:
 SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter, bool requireSameTokenInPartialTrust);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust);
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo

参数

type
Type Type Type

要序列化的对象的 TypeThe Type of the object to serialize.

converter
IFormatterConverter IFormatterConverter IFormatterConverter

在反序列化过程中使用的 IFormatterConverterThe IFormatterConverter used during deserialization.

requireSameTokenInPartialTrust
Boolean Boolean Boolean

指示对象是否需要部分信任的同一标记。Indicates whether the object requires same token in partial trust.

适用于