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

◆ ArrayAccess() [1/2]

static IndexExpression System.Linq.Expressions.Expression< TDelegate >.ArrayAccess ( Expression< TDelegate > array,
IEnumerable< Expression< TDelegate > >? indexes )
inlinestaticinherited

Definition at line 2801 of file Expression.cs.

2802 {
2804 Type type = array.Type;
2805 if (!type.IsArray)
2806 {
2807 throw Error.ArgumentMustBeArray("array");
2808 }
2810 if (type.GetArrayRank() != readOnlyCollection.Count)
2811 {
2812 throw Error.IncorrectNumberOfIndexes();
2813 }
2815 {
2817 if (item.Type != typeof(int))
2818 {
2819 throw Error.ArgumentMustBeArrayIndexType("indexes");
2820 }
2821 }
2822 return new IndexExpression(array, null, readOnlyCollection);
2823 }
static void RequiresCanRead(Expression expression, string paramName)

References System.Linq.Expressions.Error.ArgumentMustBeArray(), System.Linq.Expressions.Error.ArgumentMustBeArrayIndexType(), System.array, System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Linq.Expressions.Error.IncorrectNumberOfIndexes(), System.item, System.Dynamic.Utils.ExpressionUtils.RequiresCanRead(), and System.type.