Table of Contents

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

array T[]

The array of elements.

Returns

T[]

The same array that was passed in.

Type Parameters

T

The 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

array object[]

The array of objects to convert.

Returns

List<string>

A List of strings representing each object.

ToList<T>(params T[])

Converts an array of elements to a List.

public static List<T> ToList<T>(params T[] array)

Parameters

array T[]

The array of elements to convert.

Returns

List<T>

A List containing all elements from the array.

Type Parameters

T

The type of elements in the array.