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
elementTypeITypeRefType of elements in the array
lenintLength of the array
valuesConstant[]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
elementTypeITypeRefType of elements in the array
valuesIList<Constant>Values to initialize the array
Returns
- Constant
Constant representing the array