Expression.MakeIndex 方法

定义

创建表示访问对象中索引属性的一 IndexExpression 个。

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

参数

instance
Expression

属性所属的对象。 如果属性为 static(Visual Basic 中的 shared),则它应为 null。

indexer
PropertyInfo

表示 Expression 要编制索引的属性。

arguments
IEnumerable<Expression>

IEnumerable<Expression>IEnumerable (Of Expression) in Visual Basic) 包含将用于为属性编制索引的参数。

返回

创建的 IndexExpression

适用于