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

◆ this[object key]

virtual ? object System.Collections.SortedList.this[object key]
getset

Implements System.Collections.IDictionary.

Definition at line 622 of file SortedList.cs.

623 {
624 get
625 {
626 int num = IndexOfKey(key);
627 if (num >= 0)
628 {
629 return values[num];
630 }
631 return null;
632 }
633 set
634 {
635 if (key == null)
636 {
637 throw new ArgumentNullException("key", System.SR.ArgumentNull_Key);
638 }
639 int num = Array.BinarySearch(keys, 0, _size, key, comparer);
640 if (num >= 0)
641 {
642 values[num] = value;
643 version++;
644 }
645 else
646 {
647 Insert(~num, key, value);
648 }
649 }
650 }
virtual int IndexOfKey(object key)
static string ArgumentNull_Key
Definition SR.cs:28
Definition SR.cs:7