StackFrames.Item(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a StackFrame object in a StackFrames collection.
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
Parameters
- index
- Object
Required. The index of the StackFrame object to return.
Returns
A StackFrame object.
- Attributes
Examples
The following example demonstrates how to use the Item method.
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
Remarks
The Item method throws a ArgumentException exception if the collection cannot find the object that corresponds to the index value.