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 보안
- 직접 실행 호출자의 경우 완전히 신뢰합니다. 이 멤버는 부분적으로 신뢰할 수 있는 코드에서 사용할 수 없습니다. 자세한 내용은 부분 신뢰 코드에서 라이브러리 사용를 참조하세요.