Method RemoveSwapBack
RemoveSwapBack<T, U>(ref FixedList64Bytes<T>, U)
Removes the first occurrence of a particular value in this list.
Declaration
public static bool RemoveSwapBack<T, U>(this ref FixedList64Bytes<T> list, U value) where T : unmanaged, IEquatable<U>
Parameters
Type | Name | Description |
---|---|---|
FixedList64Bytes<T> | list | The list to search. |
U | value | The value to locate and remove. |
Returns
Type | Description |
---|---|
bool | Returns true if the item is removed. |
Type Parameters
Name | Description |
---|---|
T | The type of elements in this list. |
U | The value type. |
Remarks
If a value is removed, the last element of the list is copied to overwrite the removed value, and the list's length is decremented by one.
This is cheaper than Remove<T, U>(ref FixedList64Bytes<T>, U), but the order of the remaining elements is not preserved.