internal Enumerator(PXCollection <T> collection) { this.collection = collection; this.version = collection.version; this.index = 0; this.current = (T)null; }
private void Resize() { int length = HashHelpers.GetPrime(this.count * 2); int[] intArray = new int[length]; for (int i = 0; i < intArray.Length; i++) { intArray[i] = -1; } PXCollection <T> .Entry[] entryArray = new PXCollection <T> .Entry[length]; Array.Copy(this.entries, 0, entryArray, 0, this.count); for (int i = 0; i < this.count; i++) { int j = entryArray[i].hashCode % length; entryArray[i].next = intArray[j]; intArray[j] = i; } this.buckets = intArray; this.entries = entryArray; }