Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ EmitArray() [1/2]

static void System.Linq.Expressions.Compiler.ILGen.EmitArray ( this ILGenerator il,
Type arrayType )
inlinestaticpackage

Definition at line 757 of file ILGen.cs.

758 {
759 if (arrayType.IsSZArray)
760 {
761 il.Emit(OpCodes.Newarr, arrayType.GetElementType());
762 return;
763 }
764 Type[] array = new Type[arrayType.GetArrayRank()];
765 for (int i = 0; i < array.Length; i++)
766 {
767 array[i] = typeof(int);
768 }
769 ConstructorInfo constructor = arrayType.GetConstructor(array);
770 il.EmitNew(constructor);
771 }
static readonly OpCode Newarr
Definition OpCodes.cs:281

References System.array, System.Reflection.Emit.ILGenerator.Emit(), System.Type.GetArrayRank(), System.Type.GetConstructor(), System.Type.GetElementType(), System.Type.IsSZArray, and System.Reflection.Emit.OpCodes.Newarr.