HashSet<int> hashSetA = new HashSet<int>();
HashSet<int> hashSetB = new HashSet<int>(100);
System.Collections.Genericint[] _buckets : 각 bucket 체인의 첫 Entry 인덱스Entry[] _entries : 실제 Value 데이터가 저장되는 배열int hashCode : 해시 코드int next : 다음 데이터가 있는 Slot의 _slots 배열의 인덱스T valueGetHashCode)IntersectWith (교집합), UnionWith (합집합), ExceptWith (차집합), SymmetricExceptWith (대칭 차집합) : O(N)본체 : HashSet
| 메모리 주소 | 크기 | 변수 이름 / 역할 | 저장된 값 | |
|---|---|---|---|---|
| 0x1000 | 8 Byte | Object Header | (시스템 정보) | |
| 0x1008 | 8 | MethodTable Pointer | (타입 정보 주소) | |
| 0x1010 | 8 | _buckets | 0x2000 | _buckets 배열 주소 |
| 0x1018 | 8 | _entries | 0x3000 | _entries 배열 주소 |
| 0x1020 | 8 | _comparer | (주소) | 해시 비교기 |
| 0x1028 | 4 | _count | 사용된 Entry 갯수 | |
| 0x102C | 4 | _version | 수정 횟수 | |
| 0x1030 | 4 | _freeList | 삭제된 Entry의 인덱스 | |
| 0x1034 | 4 | _freeCount | 삭제된 Entry의 갯수 |