VCCodeParameter.Index プロパティ

パラメータ リスト内のパラメータ位置を取得します。

名前空間 :  Microsoft.VisualStudio.VCCodeModel
アセンブリ :  Microsoft.VisualStudio.VCCodeModel (Microsoft.VisualStudio.VCCodeModel.dll 内)

構文

'宣言
ReadOnly Property Index As Integer
'使用
Dim instance As VCCodeParameter
Dim value As Integer

value = instance.Index
int Index { get; }
property int Index {
    int get ();
}
function get Index () : int

プロパティ値

型 : System.Int32

パラメータ リスト内のパラメータ位置。

解説

Index プロパティは 1 から始まります。Index プロパティの初期値は 1 です。この値は検索が成功するたびに変更されます。

この例では、AClassWithAttributes というクラスがプロジェクトに存在し、属性ブロックがあると仮定しています。

Sub ReturnAllAttributes()
        Dim cm As VCCodeModel
        cm = DTE.Solution.Item(1).CodeModel
        Dim cl As VCCodeClass
        cl = cm.Classes.Item("AClassWithAttributes")
        Dim att As VCCodeAttribute
        For Each att In cl.Attributes
            MsgBox(att.Name + " " + att.Index.ToString())
        Next
End Sub

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

VCCodeParameter インターフェイス

VCCodeParameter メンバ

Microsoft.VisualStudio.VCCodeModel 名前空間