Interface INativeList<T>
A resizable list.
Namespace: Unity.Collections
Assembly: Unity.Collections.dll
Syntax
public interface INativeList<T> : IIndexable<T> where T : unmanaged
Type Parameters
Name | Description |
---|---|
T | The type of the elements. |
Properties
Capacity
The number of elements that fit in the current allocation.
Declaration
int Capacity { get; set; }
Property Value
Type | Description |
---|---|
int | The number of elements that fit in the current allocation. |
IsEmpty
Whether this list is empty.
Declaration
bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
bool | True if this list is empty. |
this[int]
The element at an index.
Declaration
T this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
int | index | An index. |
Property Value
Type | Description |
---|---|
T | The element at the index. |
Exceptions
Type | Condition |
---|---|
IndexOutOfRangeException | Thrown if index is out of bounds. |
Methods
Clear()
Sets the length to 0.
Declaration
void Clear()
Remarks
Does not change the capacity.