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.

適用於