VCCodeParameter::Index Property

 

Gets the position of a parameter in a parameter list.

Namespace:   Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

property int Index {
	int get();
}

Property Value

Type: System::Int32

The position of a parameter in a parameter list.

The Index property is one-based. The initial value of the Index property is 1. Its value changes whenever a successful match is made.

This example assumes that a class named AClassWithAttributes exists in the project and that it has an attribute block.

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
Return to top
Show: