Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

OrderedDictionary<TKey,TValue>.SetAt Method

Definition

Namespace:
System.Collections.Generic
Assembly:
System.Collections.dll

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.

Overloads

Name Description
SetAt(Int32, TValue)

Sets the value for the key at the specified index.

SetAt(Int32, TKey, TValue)

Sets the key/value pair at the specified index.

SetAt(Int32, TValue)

Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs

Sets the value for the key at the specified index.

public:
 void SetAt(int index, TValue value);
public void SetAt(int index, TValue value);
member this.SetAt : int * 'Value -> unit
Public Sub SetAt (index As Integer, value As TValue)

Parameters

index
Int32

The zero-based index of the element to get or set.

value
TValue

The value to store at the specified index.

Exceptions

index is less than 0 or greater than or equal to Count.

Applies to

SetAt(Int32, TKey, TValue)

Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs
Source:
OrderedDictionary.cs

Sets the key/value pair at the specified index.

public:
 void SetAt(int index, TKey key, TValue value);
public void SetAt(int index, TKey key, TValue value);
member this.SetAt : int * 'Key * 'Value -> unit
Public Sub SetAt (index As Integer, key As TKey, value As TValue)

Parameters

index
Int32

The zero-based index of the element to get or set.

key
TKey

The key to store at the specified index.

value
TValue

The value to store at the specified index.

Exceptions

key is null.

index is less than 0 or greater than or equal to Count.

Applies to


Feedback

Was this page helpful?