PreserializedResourceWriter.AddBinaryFormattedResource 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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
。
- 屬性
例外狀況
name
或 value
為 null
。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應