Expression.MakeIndex Metod

Definition

Skapar en IndexExpression som representerar åtkomst till en indexerad egenskap i ett objekt.

public:
 static System::Linq::Expressions::IndexExpression ^ MakeIndex(System::Linq::Expressions::Expression ^ instance, System::Reflection::PropertyInfo ^ indexer, System::Collections::Generic::IEnumerable<System::Linq::Expressions::Expression ^> ^ arguments);
public static System.Linq.Expressions.IndexExpression MakeIndex(System.Linq.Expressions.Expression instance, System.Reflection.PropertyInfo indexer, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression> arguments);
public static System.Linq.Expressions.IndexExpression MakeIndex(System.Linq.Expressions.Expression instance, System.Reflection.PropertyInfo? indexer, System.Collections.Generic.IEnumerable<System.Linq.Expressions.Expression>? arguments);
static member MakeIndex : System.Linq.Expressions.Expression * System.Reflection.PropertyInfo * seq<System.Linq.Expressions.Expression> -> System.Linq.Expressions.IndexExpression
Public Shared Function MakeIndex (instance As Expression, indexer As PropertyInfo, arguments As IEnumerable(Of Expression)) As IndexExpression

Parametrar

instance
Expression

Det objekt som egenskapen tillhör. Den bör vara null om egenskapen är static (shared i Visual Basic).

indexer
PropertyInfo

En Expression som representerar egenskapen som ska indexeras.

arguments
IEnumerable<Expression>

En IEnumerable<Expression> (IEnumerable (Of Expression) i Visual Basic) som innehåller argumenten som ska användas för att indexering av egenskapen.

Returer

Den skapade IndexExpression.

Gäller för