INameObjectCollection.Set Method

Definition

Specifies the value of an object in the collection.

Overloads

Set(Int32, Object)

Sets the value of the entry at the specified index of the instance.

Set(String, Object)

Sets the value of the first entry with the specified key in the instance, if found; otherwise, adds an entry with the specified key and value into the NameObjectCollection instance.

Set(Int32, Object)

Sets the value of the entry at the specified index of the instance.

public:
 void Set(int index, System::Object ^ value);
public void Set (int index, object value);
abstract member Set : int * obj -> unit
Public Sub Set (index As Integer, value As Object)

Parameters

index
Int32

The zero-based index of the entry to set.

value
Object

The object that represents the new value of the entry to set. The value can be null.

Applies to

Set(String, Object)

Sets the value of the first entry with the specified key in the instance, if found; otherwise, adds an entry with the specified key and value into the NameObjectCollection instance.

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

Parameters

name
String

A String string key of the entry to set. The key can be null.

value
Object

The object that represents the new value of the entry to set. The value can be null.

Applies to