Inserts a new entry into the OrderedDictionary<TKey,TValue> collection with the specified key and value at the specified index.
シンタックス
'宣言
Public Sub Insert( _
ByVal As System.Integer, _
ByVal As , _
ByVal As _
)
'使用法
Dim instance As OrderedDictionary(Of TKey,TValue)
Dim index As System.Integer
Dim key As
Dim value As
instance.Insert(index, key, value)
public void Insert(
System.int ,
,
)
パラメータ
- index
- The zero-based index at which the element should be inserted.
- key
- The key of the entry to add.
- value
- The value of the entry to add. The value can be if the type of the values in the dictionary is a reference type.
例外
| 例外 | 解説 |
| System.ArgumentOutOfRangeException | is less than 0.
-or-
is greater than OrderedDictionary<TKey,TValue>.Count. |
| System.ArgumentNullException | is . |
| System.ArgumentException | An element with the same key already exists in the OrderedDictionary<TKey,TValue>. |
参照