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
args1T[]The first array to concatenate.
args2T[]The array to concatenate to the first array.
Returns
- T[]
An T[] that contains the concatenated elements of the two input arrays.
Type Parameters
TThe type of the elements of the input arrays.
ToArray(params object[])
Returns the input typed as object[].
public static object[] ToArray(params object[] args)
Parameters
argsobject[]The object[] to type as object[].
Returns
- object[]
The input
argstyped as object[].
Remarks
The ToArray(params object[]) method has no effect other than to change the compile-time type of args from object[] to object[].
ToArrayOf<T>(params T[])
Returns the input typed as T[].
public static T[] ToArrayOf<T>(params T[] args)
Parameters
argsT[]The T[] to type as T[].
Returns
- T[]
The input
argstyped as T[].
Type Parameters
TThe type of the elements of
args.
Remarks
The ToArrayOf<T>(params T[]) method has no effect other than to change the compile-time type of args from T[] to T[].
ToEnumerable(params object[])
Returns the input typed as IEnumerable<T>.
public static IEnumerable<object> ToEnumerable(params object[] args)
Parameters
argsobject[]The object[] to type as IEnumerable<T>.
Returns
- IEnumerable<object>
The input
argstyped as IEnumerable<T>.
Remarks
The ToEnumerable(params object[]) method has no effect other than to change the compile-time type of args from object[] to IEnumerable<T>.
ToEnumerableOf<T>(params T[])
Returns the input typed as IEnumerable<T>.
public static IEnumerable<T> ToEnumerableOf<T>(params T[] args)
Parameters
argsT[]The T[] to type as IEnumerable<T>.
Returns
- IEnumerable<T>
The input
argstyped as IEnumerable<T>.
Type Parameters
TThe type of the elements of
args.
Remarks
The ToEnumerableOf<T>(params 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
argTThe
Tto type as IEnumerable<T>.
Returns
- IEnumerable<T>
An IEnumerable<T> with the specified
argas the only element.
Type Parameters
TThe 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>.