共用方式為


SerializationInfo 建構函式

定義

初始化 SerializationInfo 類別的新執行個體。

多載

SerializationInfo(Type, IFormatterConverter)
已淘汰.

建立 SerializationInfo 類別的新執行個體。

SerializationInfo(Type, IFormatterConverter, Boolean)
已淘汰.

初始化 SerializationInfo 類別的新執行個體。

SerializationInfo(Type, IFormatterConverter)

來源:
SerializationInfo.cs
來源:
SerializationInfo.cs
來源:
SerializationInfo.cs

警告

Formatter-based serialization is obsolete and should not be used.

重要

此 API 不符合 CLS 規範。

建立 SerializationInfo 類別的新執行個體。

public:
 SerializationInfo(Type ^ type, System::Runtime::Serialization::IFormatterConverter ^ converter);
[System.CLSCompliant(false)]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
[System.CLSCompliant(false)]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter);
[<System.CLSCompliant(false)>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo
[<System.CLSCompliant(false)>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter -> System.Runtime.Serialization.SerializationInfo
Public Sub New (type As Type, converter As IFormatterConverter)

參數

type
Type

要序列化的物件的 Type

converter
IFormatterConverter

在還原序列化期間所使用的 IFormatterConverter

屬性

例外狀況

typeconverternull

備註

當做 參數傳遞的 converter 會將 IFormatterConverter 資料從其內部表示轉換成使用者所要求的表單。 內 SerializationInfo 資料的內部表示取決於建立它的格式器。

適用於

SerializationInfo(Type, IFormatterConverter, Boolean)

來源:
SerializationInfo.cs
來源:
SerializationInfo.cs
來源:
SerializationInfo.cs

警告

Formatter-based serialization is obsolete and should not be used.

重要

此 API 不符合 CLS 規範。

初始化 SerializationInfo 類別的新執行個體。

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);
[System.CLSCompliant(false)]
[System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public SerializationInfo (Type type, System.Runtime.Serialization.IFormatterConverter converter, bool requireSameTokenInPartialTrust);
[<System.CLSCompliant(false)>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo
[<System.CLSCompliant(false)>]
[<System.Obsolete("Formatter-based serialization is obsolete and should not be used.", DiagnosticId="SYSLIB0050", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Runtime.Serialization.SerializationInfo : Type * System.Runtime.Serialization.IFormatterConverter * bool -> System.Runtime.Serialization.SerializationInfo
Public Sub New (type As Type, converter As IFormatterConverter, requireSameTokenInPartialTrust As Boolean)

參數

type
Type

要序列化的物件的 Type

converter
IFormatterConverter

在還原序列化期間所使用的 IFormatterConverter

requireSameTokenInPartialTrust
Boolean

指出物件是否在部分信任中需要相同的語彙基元。

屬性

適用於