StackFrames.Item(Object) Método

Definição

Retorna um StackFrame objeto em uma StackFrames coleção.

public:
 EnvDTE::StackFrame ^ Item(System::Object ^ index);
public:
 EnvDTE::StackFrame ^ Item(Platform::Object ^ index);
EnvDTE::StackFrame Item(winrt::Windows::Foundation::IInspectable const & index);
[System.Runtime.InteropServices.DispId(0)]
public EnvDTE.StackFrame Item (object index);
[<System.Runtime.InteropServices.DispId(0)>]
abstract member Item : obj -> EnvDTE.StackFrame
Public Function Item (index As Object) As StackFrame

Parâmetros

index
Object

Obrigatórios. O índice do objeto StackFrame a ser retornado.

Retornos

StackFrame

Um objeto StackFrame.

Atributos

Exemplos

O exemplo a seguir demonstra como usar o Item método.

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  

Comentários

O Item método lançará uma ArgumentException exceção se a coleção não conseguir localizar o objeto que corresponde ao valor do índice.

Aplica-se a