Click or drag to resize

OrderedDictionary<TKey, TValue> .Insert Method

Inserts the specified key/value pair into the OrderedDictionary<TKey, TValue> at the specified index as an O(n) operation.

Namespace: GSF.Collections
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.244-beta+cf93f5f8aea4b941e9b426fe4e180c2bd85d31a2
Syntax
public void Insert(
	int index,
	TKey key,
	TValue value
)
View Source

Parameters

index  Int32
The zero-based index of the key/value pair to insert.
key  TKey
The key of the element to insert.
value  TValue
The value of the element to insert.
Exceptions
ExceptionCondition
ArgumentNullExceptionkey is null.
ArgumentExceptionAn element with the same key already exists in the OrderedDictionary<TKey, TValue>.
ArgumentOutOfRangeExceptionindex is less than 0.-or-index is greater than Count.
See Also