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

◆ Remove< TKey, TValue >()

static bool System.Collections.Generic.CollectionExtensions.Remove< TKey, TValue > ( this IDictionary< TKey, TValue > dictionary,
TKey key,
[MaybeNullWhen(false)] out TValue value )
inlinestatic

Definition at line 39 of file CollectionExtensions.cs.

40 {
41 if (dictionary == null)
42 {
43 throw new ArgumentNullException("dictionary");
44 }
45 if (dictionary.TryGetValue(key, out value))
46 {
47 dictionary.Remove(key);
48 return true;
49 }
50 value = default(TValue);
51 return false;
52 }

References System.dictionary, System.key, and System.value.