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

◆ TryGetValue()

bool System.Collections.Generic.SortedDictionary< TKey, TValue >.TryGetValue ( TKey key,
[MaybeNullWhen(false)] out TValue value )
inline

Implements System.Collections.Generic.IDictionary< TKey, TValue >.

Definition at line 743 of file SortedDictionary.cs.

744 {
745 if (key == null)
746 {
747 throw new ArgumentNullException("key");
748 }
749 SortedSet<KeyValuePair<TKey, TValue>>.Node node = _set.FindNode(new KeyValuePair<TKey, TValue>(key, default(TValue)));
750 if (node == null)
751 {
752 value = default(TValue);
753 return false;
754 }
755 value = node.Item.Value;
756 return true;
757 }
readonly TreeSet< KeyValuePair< TKey, TValue > > _set

References System.Collections.Generic.SortedDictionary< TKey, TValue >._set, System.key, and System.value.