PreserializedResourceWriter.AddBinaryFormattedResource(String, Byte[], String) 方法

定義

新增指定類型的資源 (由位元組陣列表示),在讀取資源時將會傳遞給 BinaryFormatterAdds a resource of the specified type, represented by a byte array, that will be passed to BinaryFormatter when reading the resource.

public void AddBinaryFormattedResource (string name, byte[] value, string typeName = null);
member this.AddBinaryFormattedResource : string * byte[] * string -> unit
Public Sub AddBinaryFormattedResource (name As String, value As Byte(), Optional typeName As String = null)

參數

name
String

資源名稱。The resource name.

value
Byte[]

位元組陣列,包含 BinaryFormatter 所理解之 Byte[] 形式的資源值。A byte array containing the value of the resource in Byte[] form understood by BinaryFormatter.

typeName
String

資源的選用組件限定類型名稱。The optional assembly qualified type name of the resource. 預設值為 nullThe default value is null.

例外狀況

namevaluenullname or value is null.

適用於