ParameterInfo.Position 屬性

定義

取得型式參數清單中以零起始的參數位置。Gets the zero-based position of the parameter in the formal parameter list.

public:
 virtual property int Position { int get(); };
public virtual int Position { get; }
member this.Position : int
Public Overridable ReadOnly Property Position As Integer

屬性值

Int32

表示這個參數在參數清單中所佔據位置的整數。An integer representing the position this parameter occupies in the parameter list.

備註

只有方法簽章中的參數 (也就是,在計算位置時,會考慮在型式參數清單中) 。Only parameters in the method signature (that is, in the formal parameter list) are considered when calculating the position. 針對實例方法, this Me 不會計算代表 Visual Basic) 中 (的隱藏參數。For instance methods, the hidden parameter that represents this (Me in Visual Basic) is not counted.

這個方法會利用 PositionImpl 方法。This method utilizes the PositionImpl method.

若要取得 ParameterInfo 陣列,請先取得方法或函式,然後再呼叫 MethodBase.GetParametersTo get the ParameterInfo array, first get the method or the constructor and then call MethodBase.GetParameters.

適用於

另請參閱