窗口窗格或当前选定内容中元素数的计数。
命名空间: Microsoft.VisualStudio.Modeling.Shell
程序集: Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)
语法
声明
Public Function CountObjects ( _
flags As UInteger, _
<OutAttribute> ByRef count As UInteger _
) As Integer
public int CountObjects(
uint flags,
out uint count
)
参数
- flags
类型:System.UInt32
1 为计数窗口窗格中的所有元素 (调用 CountAllObjects);2 为仅计数窗口窗格中的已选元素 (调用 CountSelectedObjects)。
- count
类型:System.UInt32%
[out]要计算的元素的个数。
返回值
类型:System.Int32
如果该方法成功,则返回S_OK。如果失败,它会返回一个错误代码。
实现
ISelectionContainer.CountObjects(UInt32, UInt32%)
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。