SerializationInfo 构造函数

定义

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

重载

SerializationInfo(Type, IFormatterConverter)

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

SerializationInfo(Type, IFormatterConverter, Boolean)

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

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

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

converter
IFormatterConverter

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

属性

异常

typeconverternulltype or converter is null.

注解

作为参数传递的IFormatterConverter将数据从其内部表示形式转换为用户请求的形式。converterThe 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)

重要

此 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

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

converter
IFormatterConverter

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

requireSameTokenInPartialTrust
Boolean

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

属性

适用于