Class CollectionsHelperTo
- Namespace
- SunamoCollectionsTo
- Assembly
- SunamoCollectionsTo.dll
Provides helper methods for converting and creating collections.
public class CollectionsHelperTo
- Inheritance
-
CollectionsHelperTo
- Inherited Members
- Extension Methods
Methods
ToArray<T>(params T[])
Returns the provided elements as an array (identity function for arrays).
public static T[] ToArray<T>(params T[] array)
Parameters
arrayT[]The array of elements.
Returns
- T[]
The same array that was passed in.
Type Parameters
TThe type of elements in the array.
ToListString(params object[])
Converts an array of objects to a List of strings by calling ToString on each element.
public static List<string?> ToListString(params object[] array)
Parameters
arrayobject[]The array of objects to convert.
Returns
ToList<T>(params T[])
Converts an array of elements to a List.
public static List<T> ToList<T>(params T[] array)
Parameters
arrayT[]The array of elements to convert.
Returns
- List<T>
A List containing all elements from the array.
Type Parameters
TThe type of elements in the array.