다음을 통해 공유


VCCodeAttribute.Index 속성

특성 블록의 특성 위치를 가져옵니다.

네임스페이스:  Microsoft.VisualStudio.VCCodeModel
어셈블리:  Microsoft.VisualStudio.VCCodeModel(Microsoft.VisualStudio.VCCodeModel.dll)

구문

‘선언
ReadOnly Property Index As Integer
int Index { get; }
property int Index {
    int get ();
}
abstract Index : int with get
function get Index () : int

속성 값

형식: Int32
특성 블록 내의 특성 위치를 나타내는 값입니다.

설명

Index 속성은 1부터 시작 합니다. 초기 값은 Index 속성은 1. 값 일치는 내용을 찾을 때마다 변경 됩니다.

예제

전제로 라는 클래스는 AClassWithAttributes 프로젝트에 있는 특성 블록에 한 합니다.

' Macro code.
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

.NET Framework 보안

참고 항목

참조

VCCodeAttribute 인터페이스

Microsoft.VisualStudio.VCCodeModel 네임스페이스