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

◆ Contains()

bool System.Collections.Specialized.ListDictionary.Contains ( object key)
inline

Implements System.Collections.IDictionary.

Definition at line 365 of file ListDictionary.cs.

366 {
367 if (key == null)
368 {
369 throw new ArgumentNullException("key");
370 }
371 for (DictionaryNode next = head; next != null; next = next.next)
372 {
373 object key2 = next.key;
374 if ((comparer == null) ? key2.Equals(key) : (comparer.Compare(key2, key) == 0))
375 {
376 return true;
377 }
378 }
379 return false;
380 }

References System.Collections.IComparer.Compare(), System.Collections.Specialized.ListDictionary.comparer, System.Collections.Specialized.ListDictionary.head, System.key, and System.Collections.Specialized.ListDictionary.DictionaryNode.next.

Referenced by System.Collections.Specialized.HybridDictionary.Contains().