PreserializedResourceWriter.AddBinaryFormattedResource 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.
新增指定類型的資源,以位元組陣列表示,讀取該資源時會傳遞給 BinaryFormatter 該資源。
[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);
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}")>]
member this.AddBinaryFormattedResource : string * byte[] * string -> unit
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。
- 屬性
例外狀況
name 或 value 為 null。