Share via


StackFrames.Item 메서드

StackFrames 컬렉션의 StackFrame 개체를 반환합니다.

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

구문

‘선언
Function Item ( _
    index As Object _
) As StackFrame
StackFrame Item(
    Object index
)
StackFrame^ Item(
    [InAttribute] Object^ index
)
abstract Item : 
        index:Object -> StackFrame
function Item(
    index : Object
) : StackFrame

매개 변수

  • index
    형식: Object

    필수입니다. 반환할 StackFrame 개체의 인덱스입니다.

반환 값

형식: EnvDTE.StackFrame
StackFrame 개체

설명

Item 메서드는 컬렉션에서 인덱스 값에 해당하는 개체를 찾지 못하면 ArgumentException 예외를 throw합니다.

예제

다음 예제에서는 Item 메서드를 사용하는 방법을 보여 줍니다.

이 메서드를 테스트하려면

  1. 대상 응용 프로그램에 중단점을 설정합니다.

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

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

public static void StackFramesItem(DTE dte)
{
    EnvDTE.StackFrames stackFrames = dte.Debugger.CurrentThread.StackFrames;
    MessageBox.Show("\nThe stack frame function name: " + 
                    stackFrames.Item(1).FunctionName, 
                    "Stack Frames Item Method Test");
}
Shared Sub StackFramesItem(ByRef dte As EnvDTE.DTE)
    Dim stackFrames As EnvDTE.StackFrames = dte.Debugger.CurrentThread.StackFrames
    MessageBox.Show("The stack frame function name: " + _
                    stackFrames.Item(1).FunctionName, _
                    "Stack Frame Test - Item Method")
End Sub

.NET Framework 보안

참고 항목

참조

StackFrames 인터페이스

EnvDTE 네임스페이스

기타 리소스

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