Table of Contents

Struct ReadOnlyHashSet<T>

Namespace
Jitter2.DataStructures
Assembly
Jitter2.dll

A read-only wrapper around HashSet<T> that prevents modification while allowing enumeration and lookup.

public readonly struct ReadOnlyHashSet<T> : IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable

Type Parameters

T

The type of elements in the set.

Implements
Inherited Members

Constructors

ReadOnlyHashSet(HashSet<T>)

A read-only wrapper around HashSet<T> that prevents modification while allowing enumeration and lookup.

public ReadOnlyHashSet(HashSet<T> hashset)

Parameters

hashset HashSet<T>

Properties

Count

Gets the number of elements in the set.

public int Count { get; }

Property Value

int

Methods

Contains(T)

Determines whether the set contains the specified element.

public bool Contains(T item)

Parameters

item T

Returns

bool

CopyTo(T[])

Copies the elements of the set to an array.

public void CopyTo(T[] array)

Parameters

array T[]

CopyTo(T[], int)

Copies the elements of the set to an array, starting at a particular index.

public void CopyTo(T[] array, int arrayIndex)

Parameters

array T[]
arrayIndex int

GetEnumerator()

public HashSet<T>.Enumerator GetEnumerator()

Returns

HashSet<T>.Enumerator