IResourceWriter.AddResource IResourceWriter.AddResource IResourceWriter.AddResource 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[]) AddResource(String, Byte[]) AddResource(String, Byte[]) 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) AddResource(String, Object) AddResource(String, Object) AddResource(String, Object)

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

AddResource(String, String) AddResource(String, String) AddResource(String, String) AddResource(String, String)

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

AddResource(String, Byte[]) AddResource(String, Byte[]) AddResource(String, Byte[]) 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);
abstract member AddResource : string * byte[] -> unit
Public Sub AddResource (name As String, value As Byte())

Parameters

name
String String String String

Name of a resource.

value
Byte[]

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

Exceptions

Remarks

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

AddResource(String, Object) AddResource(String, Object) AddResource(String, Object) 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);
abstract member AddResource : string * obj -> unit
Public Sub AddResource (name As String, value As Object)

Parameters

name
String String String String

The name of the resource.

value
Object Object Object Object

The value of the resource.

Exceptions

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.

AddResource(String, String) AddResource(String, String) AddResource(String, String) 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);
abstract member AddResource : string * string -> unit
Public Sub AddResource (name As String, value As String)

Parameters

name
String String String String

The name of the resource.

value
String String String String

The value of the resource.

Exceptions

Remarks

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

Applies to