Method From
From(ITypeRef, Constant[])
Create a constant array of values of a given type
Declaration
public static Constant From(ITypeRef elementType, params Constant[] values)
Parameters
public static Constant From(ITypeRef elementType, params Constant[] values)
ITypeRef | elementType | Type of elements in the array |
Constant[] | values | Values to initialize the array |
Returns
Constant | Constant representing the array |
From(ITypeRef, Int32, Constant[])
Create a constant array of values of a given type with a fixed size, zero filling any unspecified values
Declaration
public static Constant From(ITypeRef elementType, int len, params Constant[] values)
Parameters
public static Constant From(ITypeRef elementType, int len, params Constant[] values)
ITypeRef | elementType | Type of elements in the array |
Int32 | len | Length of the array |
Constant[] | values | Values to initialize the array |
Returns
Constant | Constant representing the array |
Remarks
If the number of arguments provided for the values is less than len
then the remaining elements of the array are set with the null value for the elementType
From(ITypeRef, IList<Constant>)
Create a constant array of values of a given type
Declaration
public static Constant From(ITypeRef elementType, IList<Constant> values)
Parameters
public static Constant From(ITypeRef elementType, IList<Constant> values)
ITypeRef | elementType | Type of elements in the array |
IList<Constant> | values | Values to initialize the array |
Returns
Constant | Constant representing the array |