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


VCCodeProperty - интерфейс

An object representing a property code element (declared with the __property keyword).

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

Синтаксис

'Декларация
<GuidAttribute("17730D5B-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeProperty
'Применение
Dim instance As VCCodeProperty
[GuidAttribute("17730D5B-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeProperty
[GuidAttribute(L"17730D5B-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeProperty
public interface VCCodeProperty

Заметки

The VCCodeProperty object represents a property code element in a source file and allows access to information about that specific code element.

ПримечаниеПримечание.

A large part of the functionality of this object is provided by the Visual Studio CodeProperty object. For more information, see CodeProperty object.

See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.

Примеры

This example retrieves all properties of the first class and displays their names in a message box.

Sub GetProperties()
    Dim vcCM As VCCodeModel
    Dim vcClass As VCCodeClass
    Dim vcProperty as VCCodeProperty
    vcCM = DTE.Solution.Item(1).CodeModel
    vcClass = vcCM.Classes.Item(1)
    For Each vcProperty in vcClass.Properties
        MsgBox(vcProperty.DisplayName)
    Next
End Sub

См. также

Ссылки

VCCodeProperty - члены

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