Interface IDynamicSizeArray<T>
- Assembly
- AndrasCsanyi.DataStructuresAndAlgs.dll
Dynamic size array, short name, List. The array is typed meaning it can handle only a single type. The list is based on an array meaning this type in contiguous. The size of this list is dynamically managed and doesn't require any act from the user.
public interface IDynamicSizeArray<T>
Type Parameters
T
-
The type of the items in the list.
Methods
Add(T)
Adds a type T elem to the list. The place of the item is after the last item in the list.
void Add(T item)
Parameters
item
T-
The item to be added.
Count()
Returns the amount of elements in the Dynamic Size Array. The amount of elements does not equal to the allocated size of the storage array of the implementation. For that AndrasCsanyi.DataStructuresAndAlgs.DynamicSizeArray.DynamicSizeArray`1.StorageSize test method.
int Count()
Returns
- int
-
The amount of elements in the Dynamic Size Array.
Get(int)
Returns the elements at the defined index value.
T Get(int index)
Parameters
index
int-
The index value.
Returns
- T
-
Element of {T}.