Class ArrayExtensions
Inheritance
System.Object
ArrayExtensions
Assembly: ISynergy.Framework.Core.dll
Syntax
public static class ArrayExtensions : object
Methods
View Source
Concatenate<T>(T, T[])
Combines a vector and a element horizontally.
Declaration
public static T[] Concatenate<T>(this T element, T[] vector)
Parameters
Type |
Name |
Description |
T |
element |
|
T[] |
vector |
|
Returns
Type Parameters
View Source
GetLength(Array, Boolean, Boolean)
Gets the length of each dimension of an array.
Declaration
public static int[] GetLength(this Array array, bool deep = true, bool max = false)
Parameters
Type |
Name |
Description |
Array |
array |
The array.
|
System.Boolean |
deep |
Pass true to retrieve all dimensions of the array,
even if it contains nested arrays (as in jagged matrices)
|
System.Boolean |
max |
Gets the maximum length possible for each dimension (in case
the jagged matrices has different lengths).
|
Returns
Type |
Description |
System.Int32[] |
|
View Source
GetTotalLength(Array, Boolean, Boolean)
Gets the total length over all dimensions of an array.
Declaration
public static int GetTotalLength(this Array array, bool deep = true, bool rectangular = true)
Parameters
Type |
Name |
Description |
Array |
array |
|
System.Boolean |
deep |
|
System.Boolean |
rectangular |
|
Returns
Type |
Description |
System.Int32 |
|
View Source
IsJagged(Array)
Determines whether an array is a jagged array
(containing inner arrays as its elements).
Declaration
public static bool IsJagged(this Array array)
Parameters
Type |
Name |
Description |
Array |
array |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
IsMatrix(Array)
Determines whether an array is an multidimensional array.
Declaration
public static bool IsMatrix(this Array array)
Parameters
Type |
Name |
Description |
Array |
array |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
IsVector(Array)
Determines whether an array is a vector.
Declaration
public static bool IsVector(this Array array)
Parameters
Type |
Name |
Description |
Array |
array |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
ToDoubleArray(Byte[])
Byte array to double array converter.
Declaration
public static double[] ToDoubleArray(this byte[] array)
Parameters
Type |
Name |
Description |
System.Byte[] |
array |
|
Returns
Type |
Description |
System.Double[] |
|
View Source
ToDoubleArray(Decimal[])
Decimal array to double array converter.
Declaration
public static double[] ToDoubleArray(this decimal[] array)
Parameters
Type |
Name |
Description |
System.Decimal[] |
array |
|
Returns
Type |
Description |
System.Double[] |
|
View Source
ToDoubleArray(Int32[])
Integer array to double array converter.
Declaration
public static double[] ToDoubleArray(this int[] array)
Parameters
Type |
Name |
Description |
System.Int32[] |
array |
|
Returns
Type |
Description |
System.Double[] |
|
View Source
ToDoubleArray(Int64[])
Long array to double array converter.
Declaration
public static double[] ToDoubleArray(this long[] array)
Parameters
Type |
Name |
Description |
System.Int64[] |
array |
|
Returns
Type |
Description |
System.Double[] |
|
View Source
ToDoubleArray(Single[])
Float array to double array converter.
Declaration
public static double[] ToDoubleArray(this float[] array)
Parameters
Type |
Name |
Description |
System.Single[] |
array |
|
Returns
Type |
Description |
System.Double[] |
|