Struct World.NoAllocReadOnlyCollection<T>
Read only collection that doesn't generate garbage when used in a foreach.
Syntax
public struct NoAllocReadOnlyCollection<T> : IEnumerable<T>, IEnumerable
Type Parameters
Constructors
NoAllocReadOnlyCollection(List<T>)
Declaration
public NoAllocReadOnlyCollection(List<T> source)
Parameters
Type |
Name |
Description |
List<T> |
source |
|
Properties
Count
Declaration
public int Count { get; }
Property Value
Item[Int32]
Declaration
public T this[int index] { get; }
Parameters
Type |
Name |
Description |
Int32 |
index |
|
Property Value
Methods
Contains(T)
Declaration
public bool Contains(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
GetEnumerator()
Declaration
public List<T>.Enumerator GetEnumerator()
Returns