VCCodeEnum.Children 属性


获取此代码构造中包含的对象的集合。Gets a collection of objects contained within this code construct.

 property EnvDTE::CodeElements ^ Children { EnvDTE::CodeElements ^ get(); };
[get: System.Runtime.InteropServices.DispId(8)]
[get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)]
public EnvDTE.CodeElements Children { get; }
[<get: System.Runtime.InteropServices.DispId(8)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.Children : EnvDTE.CodeElements
Public ReadOnly Property Children As CodeElements



一个 CodeElements 集合。A CodeElements collection.



如果对象没有任何子级,则 Nothing 返回或 nullIf an object has no children, then Nothing or null is returned.

此属性主要由 Visual C++ 使用。This property is used primarily by Visual C++. Children 从代码元素返回每个对象可再用。Children returns every object returnable from a code element. 例如,类返回成员、基、实现的接口、特性、注释等。A class, for example, returns members, bases, implemented interfaces, attributes, comments, and so forth.

若要遍历命名空间的成员或类型 (类、结构、接口等) ,必须 () QI 查询接口,或者将转换 CodeElementCodeNamespace ,然后使用 Members 属性。To iterate through the members of a namespace or type (class, struct, interface, and so forth), you must query interface (QI) or cast the CodeElement to a CodeNamespace and then use the Members property.

Children 返回 CodeElement 可通过此代码元素引用的所有相关对象的集合。Children returns the collection of all related CodeElement objects that can be referenced via this code element. Children属性可能返回 Nothing 或, null 具体取决于对象和语言。The Children property may return Nothing or null depending on the object and the language. 在 Visual Studio 中不需要支持此项。There is no requirement to support this in Visual Studio.