Method From
From(ITypeRef, params Constant[])
Create a constant array of values of a given type
public static Constant From(ITypeRef elementType, params Constant[] values)
Parameters
Returns
- Constant
Constant representing the array
From(ITypeRef, int, params Constant[])
Create a constant array of values of a given type with a fixed size, zero filling any unspecified values
public static Constant From(ITypeRef elementType, int len, params Constant[] values)
Parameters
elementType
ITypeRefType of elements in the array
len
intLength of the array
values
Constant[]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
public static Constant From(ITypeRef elementType, IList<Constant> values)
Parameters
elementType
ITypeRefType of elements in the array
values
IList<Constant>Values to initialize the array
Returns
- Constant
Constant representing the array