Method Cast
Cast<T>(Array)
Casts the elements of an Array to the specified type.
Declaration
[Obsolete("Use Enumerable.Cast<T>(source), An official Linq implementation")]
public static IEnumerable<T> Cast<T>(this Array source)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | source | The type to cast the element of |
Returns
| Type | Description |
|---|---|
| IEnumerable<T> | An IEnumerable that contains each element of the source sequence cast to target type. |
Type Parameters
| Name | Description |
|---|---|
| T | Target Type |
Cast(Array, Type)
Casts the elements of an Array to the specified type.
Declaration
public static IEnumerable Cast(this Array source, Type targetType)
Parameters
| Type | Name | Description |
|---|---|---|
| Array | source | The Array whose elements to filter. |
| Type | targetType | The type to cast the element of |
Returns
| Type | Description |
|---|---|
| IEnumerable | An IEnumerable that contains each element of the source sequence cast to target type. |