获取一个值,该值指示集合中对象的数目。
命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)
语法
声明
ReadOnly Property Count As Integer
    Get
int Count { get; }
property int Count {
    int get ();
}
abstract Count : int
function get Count () : int
属性值
类型:System.Int32
指示 StackFrames 集合中对象数的整数值。
示例
下面的示例演示如何使用 Count 属性。
测试此属性:
- 在目标应用程序中,在 Main() 方法以外的方法内部设置一个断点。 
- 以调试模式运行目标应用程序。 
- 当应用程序停在该断点处时,运行外接程序。 
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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。