public bool ContainsKey(int key) { if (key < 0) { if (_Negative == null) { return(false); } else { return(_Negative.ContainsKey(0 - key)); } } if (key >= _Capability) { return(false); } int index = key / _BucketSize; if (_Index[index] == null) { return(false); } int subIndex = key % _BucketSize; return(_Index[index].Used[subIndex] != 0); }
public bool Contains(int item) { return(_Dictionary.ContainsKey(item)); }