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

◆ ArrayIndex() [1/3]

static BinaryExpression System.Linq.Expressions.Expression< TDelegate >.ArrayIndex ( Expression< TDelegate > array,
Expression< TDelegate > index )
inlinestaticinherited

Definition at line 2079 of file Expression.cs.

2080 {
2083 if (index.Type != typeof(int))
2084 {
2085 throw Error.ArgumentMustBeArrayIndexType("index");
2086 }
2087 Type type = array.Type;
2088 if (!type.IsArray)
2089 {
2090 throw Error.ArgumentMustBeArray("array");
2091 }
2092 if (type.GetArrayRank() != 1)
2093 {
2094 throw Error.IncorrectNumberOfIndexes();
2095 }
2096 return new SimpleBinaryExpression(ExpressionType.ArrayIndex, array, index, type.GetElementType());
2097 }
static void RequiresCanRead(Expression expression, string paramName)

References System.Linq.Expressions.Error.ArgumentMustBeArray(), System.Linq.Expressions.Error.ArgumentMustBeArrayIndexType(), System.array, System.Linq.Expressions.Error.IncorrectNumberOfIndexes(), System.Linq.index, System.Dynamic.Utils.ExpressionUtils.RequiresCanRead(), and System.type.

Referenced by System.Dynamic.DynamicObject.MetaDynamic.ReferenceArgAssign().