Поделиться через


VCCodeElement.Children - свойство

Gets a collection of objects contained within this code construct.

Пространство имен:  Microsoft.VisualStudio.VCCodeModel
Сборка:  Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)

Синтаксис

'Декларация
ReadOnly Property Children As CodeElements
'Применение
Dim instance As VCCodeElement
Dim value As CodeElements

value = instance.Children
CodeElements Children { get; }
property CodeElements^ Children {
    CodeElements^ get ();
}
function get Children () : CodeElements

Значение свойства

Тип: EnvDTE.CodeElements

A CodeElements collection.

Заметки

If an object has no children, then Nothing or nullссылка null (Nothing в Visual Basic) is returned.

Children is used primarily by Visual C++. Children returns every object returnable from a code element. A class, for example, returns members, bases, implemented interfaces, attributes, comments, and so forth.

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 returns the collection of all related CodeElement objects that can be referenced via this code element. For example, for a CodeClass, this might include the metadata code elements for the class and perhaps the Visual C++ declspecs, along with contributed code based on the Attributed Programming feature in Visual C++, template parameters, and so forth. The Children property may return Nothing or nullссылка null (Nothing в Visual Basic) depending on the object and the language. There is no requirement to support this in Visual Studio.

Разрешения

  • Полное доверие для непосредственно вызывающего метода. Этот член не может быть использован частично доверенным кодом. Дополнительные сведения см. в разделе Using Libraries from Partially Trusted Code.

См. также

Основные понятия

How to: Compile and Run the Automation Object Model Code Examples

Ссылки

VCCodeElement Интерфейс

VCCodeElement - члены

Microsoft.VisualStudio.VCCodeModel - пространство имен