VCCodeVariable.Children 属性

获取此代码构造中包含的对象的集合。

命名空间:  Microsoft.VisualStudio.VCCodeModel
程序集:  Microsoft.VisualStudio.VCCodeModel(在 Microsoft.VisualStudio.VCCodeModel.dll 中)

语法

声明
ReadOnly Property Children As CodeElements
CodeElements Children { get; }
property CodeElements^ Children {
    CodeElements^ get ();
}
abstract Children : CodeElements with get
function get Children () : CodeElements

属性值

类型:CodeElements
一个 CodeElements 集合。

备注

如果对象没有子级,则返回 Nothing 或 nullnull 引用(在 Visual Basic 中为 Nothing)。

Children 主要由 Visual C++ 使用。 Children 返回可从代码元素返回的每个对象。

若要循环访问命名空间或类型(类、结构、接口等)的成员,必须使用查询接口 (QI) 或将 CodeElement 强制转换为 CodeNamespace,然后使用 Members 属性。

Children 返回可通过此代码元素引用的所有相关 CodeElement 对象的集合。

Children 属性可能返回 Nothing 或 nullnull 引用(在 Visual Basic 中为 Nothing),这取决于具体的对象和语言。 在 Visual Studio 中无需支持此行为。

.NET Framework 安全性

请参阅

参考

VCCodeVariable 接口

Microsoft.VisualStudio.VCCodeModel 命名空间

其他资源

如何:编译和运行自动化对象模型代码示例