Class: Base2art.Collections.EnumerableExtender

A set of extension methods for System.Collections.Generic.IEnumerable`1.

Inherits

└── System.Object

Methods

AsReadOnlyArrayList<T>(T[])

Gets an array as readonly.

Parameter Type Info
array T[] The item to get as readonly.

Returns: Base2art.Collections.IReadOnlyArrayList<T>
=> A readonly interface.


AsReadOnlyArrayList<T>(System.Collections.Generic.IList<T>)

Gets a list as readonly.

Parameter Type Info
array System.Collections.Generic.IList<T> The item to get as readonly.

Returns: Base2art.Collections.IReadOnlyArrayList<T>
=> A readonly interface.


ForAll<T>(System.Collections.Generic.IEnumerable<T>, System.Action<T>)

An method that executes an action for every item in an System.Collections.Generic.IEnumerable`1.

Parameter Type Info
collection System.Collections.Generic.IEnumerable<T> The collection to iterate over.
action System.Action<T> The action to execute.

GetGenericEnumerator<T>(T[])

Get A generic enumerator for an array.

Parameter Type Info
array T[] The item to get the enumerator for.

Returns: System.Collections.Generic.IEnumerator<T>
=> The enumerator.


In<T>(T, System.Collections.Generic.IEnumerable<T>)

A method that tells you if the item is in the collection.

Parameter Type Info
item T The item to search for.
collection System.Collections.Generic.IEnumerable<T> The collection to search.

Returns: System.Boolean
=> A value indicating if the item is in the collection.


In<T>(T, T[])

A method that tells you if the item is in the collection.

Parameter Type Info
item T The item to search for.
collection T[] The collection to search.

Returns: System.Boolean
=> A value indicating if the item is in the collection.


IndexOf<T>(System.Collections.Generic.IEnumerable<T>, T)

Gets the index of an item in the list.

Parameter Type Info
collection System.Collections.Generic.IEnumerable<T> The item to scan.
value T The value to look for.

Returns: System.Int32
=> The index of the sought after item.


IndexOf<T>(System.Collections.Generic.IEnumerable<T>, System.Func<T, System.Boolean>)

Gets the index of an item in the list.

Parameter Type Info
collection System.Collections.Generic.IEnumerable<T> The item to scan.
func System.Func<T, System.Boolean> The search function.

Returns: System.Int32
=> The index of the sought after item.

Inherited Methods

  • ToString

  • Equals(System.Object)

  • Equals(System.Object, System.Object)

  • ReferenceEquals(System.Object, System.Object)

  • GetHashCode

  • GetType