共用方式為


PreserializedResourceWriter.AddBinaryFormattedResource 方法

定義

警告

BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.

加入由位元組陣列表示之指定型別的資源,此陣列會在讀取資源時傳遞至 BinaryFormatter

public void AddBinaryFormattedResource (string name, byte[] value, string? typeName = default);
[System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public void AddBinaryFormattedResource (string name, byte[] value, string? typeName = default);
public void AddBinaryFormattedResource (string name, byte[] value, string typeName = default);
member this.AddBinaryFormattedResource : string * byte[] * string -> unit
[<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
member this.AddBinaryFormattedResource : string * byte[] * string -> unit
Public Sub AddBinaryFormattedResource (name As String, value As Byte(), Optional typeName As String = Nothing)

參數

name
String

資源名稱。

value
Byte[]

位元組陣列,包含由 BinaryFormatter 所了解的 Byte[] 形式中資源值。

typeName
String

資源的選用組件限定類型名稱。 預設值是 null

屬性

例外狀況

namevaluenull

適用於