Share via


StackFrames.Count 속성

컬렉션에 있는 개체의 수를 나타내는 값을 가져옵니다.

네임스페이스:  EnvDTE
어셈블리:  EnvDTE(EnvDTE.dll)

구문

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

속성 값

형식: Int32
StackFrames 컬렉션의 개체 수를 나타내는 정수 값입니다.

예제

다음 예제에서는 Count 속성을 사용하는 방법을 보여 줍니다.

이 속성을 테스트하려면

  1. 대상 응용 프로그램에서 Main() 메서드 이외의 메서드 내부에 중단점을 설정합니다.

  2. 디버그 모드에서 대상 응용 프로그램을 실행합니다.

  3. 응용 프로그램이 중단점에서 멈추면 추가 기능을 실행합니다.

public static void StackFramesCount(DTE dte)
{
    EnvDTE.StackFrames stackFrames = dte.Debugger.CurrentThread.StackFrames;
    MessageBox.Show("\nThere are  " + stackFrames.Count + 
                    " stack frames.\n", "Stack Frames Count Property Test" );
}
Shared Sub StackFramesCount(ByRef dte As EnvDTE.DTE)
    Dim stackFrames As EnvDTE.StackFrames = dte.Debugger.CurrentThread.StackFrames
    MessageBox.Show("There are " + stackFrames.Count.ToString() + _
                    " stack frames.", "Stack Frame Test - Count Property")
End Sub

.NET Framework 보안

참고 항목

참조

StackFrames 인터페이스

EnvDTE 네임스페이스

기타 리소스

방법: 자동화 개체 모델 코드의 예제 컴파일 및 실행