Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Insert()

void System.Collections.Specialized.OrderedDictionary.Insert ( int index,
object key,
object? value )
inline

Implements System.Collections.Specialized.IOrderedDictionary.

Definition at line 322 of file OrderedDictionary.cs.

323 {
324 if (_readOnly)
325 {
326 throw new NotSupportedException(System.SR.OrderedDictionary_ReadOnly);
327 }
328 if (index > Count || index < 0)
329 {
330 throw new ArgumentOutOfRangeException("index");
331 }
332 Hashtable hashtable = EnsureObjectsTable();
333 ArrayList arrayList = EnsureObjectsArray();
334 hashtable.Add(key, value);
335 arrayList.Insert(index, new DictionaryEntry(key, value));
336 }
static string OrderedDictionary_ReadOnly
Definition SR.cs:32
Definition SR.cs:7

References System.Collections.Specialized.OrderedDictionary._readOnly, System.Collections.Hashtable.Add(), System.Collections.Specialized.OrderedDictionary.Count, System.Runtime.Serialization.Dictionary, System.Collections.Specialized.OrderedDictionary.EnsureObjectsArray(), System.Collections.Specialized.OrderedDictionary.EnsureObjectsTable(), System.index, System.key, System.SR.OrderedDictionary_ReadOnly, and System.value.