[]
Represents a strongly typed list of structs that can be effectively accessed by index.
public class StructList<T> where T : struct
Public Class StructList(Of T As Structure)
Name | Description |
---|---|
T | The type of structs in the list. |
Name | Description |
---|---|
StructList() | Initializes a new instance of the StructList<T> class that is empty. |
StructList(IEnumerable<T>) | Initializes a new instance of the StructList<T> class that contains elements copied from the specified collection. |
StructList(int) | Initializes a new instance of the StructList<T> class that is empty and has the specified initial capacity. |
StructList(T[], int, int) | Initializes a new instance of the StructList<T> class that contains elements copied from the specified array. |
Name | Description |
---|---|
Capacity | Gets or sets the total number of elements the internal array can hold without resizing. |
Count | Gets the number of elements actually contained in the StructList<T>. |
InnerArray | Gets the current array containing the elements of the StructList<T>. |
this[int] | Gets a reference to the struct at the specified index. |
SyncRoot | Gets an object that can be used to synchronize access to the StructList<T>. |
Name | Description |
---|---|
Add(in T) | Adds a struct to the end of the StructList<T>. |
AddArray(T[], int, int) | Adds the elements of the specified array to the end of the StructList<T>. |
AddRange(IEnumerable<T>) | Adds the elements of the specified collection to the end of the StructList<T>. |
AsReadOnly() | Returns a read-only ReadOnlyStructList<T> wrapper for the current StructList<T>. |
BinarySearch(int, int, in T, IStructComparer<T>) | Searches a range of elements in the sorted StructList<T> for an element using the specified comparer and returns the zero-based index of the element. |
BinarySearch(int, int, in T, StructComparison<T>) | Searches a range of elements in the sorted StructList<T> for an element using the specified StructComparison<T> and returns the zero-based index of the element. |
Clear() | Removes all elements from the StructList<T>. |
ConvertAll<TOutput>(StructConverter<T, TOutput>) | Converts the elements in the current StructList<T> to another type, and returns a list containing the converted elements. |
CopyTo(int, T[], int, int) | Copies a range of elements from the StructList<T> to a compatible one-dimensional array, starting at the specified index of the target array. |
CopyTo(T[], int) | Copies the entire StructList<T> to a compatible one-dimensional array, starting at the specified index of the target array. |
CountAll(StructPredicate<T>) | Gets the number of elements in the StructList<T> that match the conditions defined by the specified predicate. |
Exists(StructPredicate<T>) | Determines whether the StructList<T> contains elements that match the conditions defined by the specified predicate. |
FindAll(StructPredicate<T>) | Retrieves all the elements that match the conditions defined by the specified predicate. |
FindIndex(StructPredicate<T>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire StructList<T>. |
FindIndex(int, StructPredicate<T>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the StructList<T> that extends from the specified index to the last element. |
FindIndex(int, int, StructPredicate<T>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the StructList<T> that starts at the specified index and contains the specified number of elements. |
FindLastIndex(StructPredicate<T>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire StructList<T>. |
FindLastIndex(int, StructPredicate<T>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the StructList<T> that extends from the first element to the specified index. |
FindLastIndex(int, int, StructPredicate<T>) | Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the StructList<T> that contains the specified number of elements and ends at the specified index. |
ForEach(StructAction<T>) | Performs the specified action on each element of the StructList<T>. |
GetRange(int, int) | Creates a shallow copy of a range of elements in the source StructList<T>. |
Insert(int, in T) | Inserts a struct into the StructList<T> at the specified index. |
InsertArray(int, T[], int, int) | Inserts the elements of an array into the StructList<T> at the specified index. |
InsertRange(int, IEnumerable<T>) | Inserts the elements of a collection into the StructList<T> at the specified index. |
RemoveAll(StructPredicate<T>) | Removes all the elements that match the conditions defined by the specified predicate. |
RemoveAt(int) | Removes the element at the specified index of the StructList<T>. |
RemoveRange(int, int) | Removes a range of elements from the StructList<T>. |
Reverse() | Reverses the order of the elements in the entire StructList<T>. |
Reverse(int, int) | Reverses the order of the elements in the specified range. |
Sort(IStructComparer<T>) | Sorts the elements in the entire StructList<T> using the specified comparer. |
Sort(StructComparison<T>) | Sorts the elements in the entire StructList<T> using the specified StructComparison<T>. |
Sort(int, int, IStructComparer<T>) | Sorts the elements in a range of elements in StructList<T> using the specified comparer. |
Sort(int, int, StructComparison<T>) | Sorts the elements in a range of elements in StructList<T> using the specified StructComparison<T>. |
ToArray() | Copies the elements of the StructList<T> to a new array. |
TrimExcess() | Sets the capacity to the actual number of elements in the StructList<T>, if that number is less than a threshold value. |
TrueForAll(StructPredicate<T>) | Determines whether every element in the StructList<T> matches the conditions defined by the specified predicate. |