ערוך

שתף באמצעות


IResourceWriter.AddResource Method

Definition

Adds a resource to the list of resources to be written to an output file or output stream.

Overloads

AddResource(String, Byte[])

Adds an 8-bit unsigned integer array as a named resource to the list of resources to be written.

AddResource(String, Object)

Adds a named resource of type Object to the list of resources to be written.

AddResource(String, String)

Adds a named resource of type String to the list of resources to be written.

AddResource(String, Byte[])

Adds an 8-bit unsigned integer array as a named resource to the list of resources to be written.

public:
 void AddResource(System::String ^ name, cli::array <System::Byte> ^ value);
public void AddResource (string name, byte[]? value);
public void AddResource (string name, byte[] value);
abstract member AddResource : string * byte[] -> unit
Public Sub AddResource (name As String, value As Byte())

Parameters

name
String

Name of a resource.

value
Byte[]

Value of a resource as an 8-bit unsigned integer array.

Exceptions

The name parameter is null.

Remarks

The resources are not written until the Generate method is called.

Applies to

AddResource(String, Object)

Adds a named resource of type Object to the list of resources to be written.

public:
 void AddResource(System::String ^ name, System::Object ^ value);
public void AddResource (string name, object? value);
public void AddResource (string name, object value);
abstract member AddResource : string * obj -> unit
Public Sub AddResource (name As String, value As Object)

Parameters

name
String

The name of the resource.

value
Object

The value of the resource.

Exceptions

The name parameter is null.

Remarks

The resource is not written until the Generate method is called.

Note

value might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used.

Applies to

AddResource(String, String)

Adds a named resource of type String to the list of resources to be written.

public:
 void AddResource(System::String ^ name, System::String ^ value);
public void AddResource (string name, string? value);
public void AddResource (string name, string value);
abstract member AddResource : string * string -> unit
Public Sub AddResource (name As String, value As String)

Parameters

name
String

The name of the resource.

value
String

The value of the resource.

Exceptions

The name parameter is null.

Remarks

The resource is not written until the Generate method is called.

Applies to