IListEx
Inherits object
Public Static Functions
void
Compacts the list by replacing null elements with the next non-null element to the right. This operation iterates once and sets each null element to the value of its immediate successor. If multiple consecutive elements are null, each will be replaced with the element immediately following it, propagating values leftward. The last element in the list is not modified.
void
Adds a tuple of (TValue, Action) to the list using a provided delegate.
void
void
Randomly shuffles the elements of the list in-place using the Fisher–Yates algorithm.
TValue
Returns a random element from the list. A randomly chosen element from list.
TValue[]
Creates a new array containing only the non-null elements from the source list. An array of TValue with all null elements removed.
string
Converts a list of bytes into its uppercase hexadecimal string representation without separators. A string containing the hex representation of the bytes. The output is two hex characters per byte, using uppercase A-F, and contains no delimiters.
void
Reverses the order of bytes in the list in-place.
void
Adds elements from other to list that are not already present, functioning as a union operation while preserving the original list. For small lists, containment checks are performed directly. For larger lists with many duplicates, a HashSet{T} is created after a threshold of observed duplicates to improve performance.
Private Attributes
Random
RNG
A shared random number generator used by methods requiring randomness.
