INameObjectCollection.Set Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- value
- Object
The object that represents the new value of the entry to set. The value can be null.