private void Initialize(int capacity) { int prime = PrimeHelper.GetPrime(capacity); buckets = new int[prime]; for (int i = 0; i < buckets.Length; i++) { buckets[i] = -1; } keys = new TKey[prime]; values = new TValue[prime]; hashCodes = new int[prime]; next = new int[prime]; freeList = -1; }
private void Initialize(int capacity) { int prime = PrimeHelper.GetPrime(capacity); _Buckets = new int[prime]; for (int i = 0; i < _Buckets.Length; i++) { _Buckets[i] = -1; } _Keys = new TKey[prime]; _Values = new TValue[prime]; _HashCodes = new int[prime]; _Next = new int[prime]; _FreeList = -1; }
private void Initialize(int capacity) { int prime = PrimeHelper.GetPrime(capacity); _Values = new T[prime]; }