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


VCCodeEnum - интерфейс

An object representing an enumeration code element in the source code of a solution.

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

Синтаксис

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

Заметки

A large part of the functionality of this object is provided by the Visual Studio CodeEnum 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 displays the variables used by the first enumeration of the CAboutDlg class. It assumes a CAboutDlg class exists and has enumerations.

Sub GetEnums()
    Dim vcCM As VCCodeModel
    Dim vcEnum As VCCodeEnum
    Dim vcVariable As VCCodeVariable
    vcCM = DTE.Solution.Item(1).CodeModel
    vcEnum = vcCM.Classes.Item("CAboutDlg").Enums.Item(1)
    For Each vcVariable In vcEnum.Members
        MsgBox(vcVariable.DisplayName)
    Next
End Sub

См. также

Ссылки

VCCodeEnum - члены

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