Class Arguments
- Namespace
- Cuemon.Collections.Generic
- Assembly
- Cuemon.Core.dll
Provides a set of static methods for both typing (no conversion) and converting a variable number of arguments into its equivalent object[], IEnumerable<T> and T[].
public static class Arguments
- Inheritance
-
Arguments
Methods
Concat<T>(T[], T[])
Concatenates two arrays.
public static T[] Concat<T>(T[] args1, T[] args2)
Parameters
args1
T[]The first array to concatenate.
args2
T[]The array to concatenate to the first array.
Returns
- T[]
An T[] that contains the concatenated elements of the two input arrays.
Type Parameters
T
The type of the elements of the input arrays.
ToArray(Object[])
Returns the input typed as object[].
public static object[] ToArray(params object[] args)
Parameters
args
Object[]The object[] to type as object[].
Returns
- Object[]
The input
args
typed as object[].
Remarks
The ToArray(Object[]) method has no effect other than to change the compile-time type of args
from object[] to object[].
ToArrayOf<T>(T[])
Returns the input typed as T[].
public static T[] ToArrayOf<T>(params T[] args)
Parameters
args
T[]The T[] to type as T[].
Returns
- T[]
The input
args
typed as T[].
Type Parameters
T
The type of the elements of
args
.
Remarks
The ToArrayOf<T>(T[]) method has no effect other than to change the compile-time type of args
from T[] to T[].
ToEnumerable(Object[])
Returns the input typed as IEnumerable<T>.
public static IEnumerable<object> ToEnumerable(params object[] args)
Parameters
args
Object[]The object[] to type as IEnumerable<T>.
Returns
- IEnumerable<Object>
The input
args
typed as IEnumerable<T>.
Remarks
The ToEnumerable(Object[]) method has no effect other than to change the compile-time type of args
from object[] to IEnumerable<T>.
ToEnumerableOf<T>(T[])
Returns the input typed as IEnumerable<T>.
public static IEnumerable<T> ToEnumerableOf<T>(params T[] args)
Parameters
args
T[]The T[] to type as IEnumerable<T>.
Returns
- IEnumerable<T>
The input
args
typed as IEnumerable<T>.
Type Parameters
T
The type of the elements of
args
.
Remarks
The ToEnumerableOf<T>(T[]) method has no effect other than to change the compile-time type of args
from T[] to IEnumerable<T>.
Yield<T>(T)
Returns an IEnumerable<T> with the specified arg
as the only element.
public static IEnumerable<T> Yield<T>(T arg)
Parameters
arg
TThe
T
to type as IEnumerable<T>.
Returns
- IEnumerable<T>
An IEnumerable<T> with the specified
arg
as the only element.
Type Parameters
T
The type of the element of
arg
.
Remarks
The Yield<T>(T) method has no effect other than to change the compile-time type of arg
from T
to IEnumerable<T>.