StackFrames.Count Property
Gets a value indicating the number of objects in the collection.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property Count As Integer
int Count { get; }
property int Count {
int get ();
}
abstract Count : int
function get Count () : int
Property Value
Type: System.Int32
An integer value indicating the number of objects in the StackFrames collection.
Examples
The following example demonstrates how to use the Count property.
To test this property:
In your target application, set a breakpoint inside the method other than the method Main().
Run the target application in the debug mode.
When the application stops on the breakpoint, run the add-in.
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 Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples