This documentation is archived and is not being maintained.

VCCodeEnum Object

Visual Studio .NET 2003

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

[Visual Basic .NET]
Public Interface VCCodeEnum
   Inherits IDispatch
[Visual Basic 6]
Class VCCodeEnum
[C++]
interface VCCodeEnum : IDispatch
[C#]
public interface VCCodeEnum : IDispatch
[JScript .NET]
public interface VCCodeEnum extends IDispatch

Remarks

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

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

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

See Samples for Code Model Extensibility for information on how to compile and run this sample.

See Also

VCCodeEnum Object Properties, Methods, and Events | Visual C++ Extensibility Object Model

Show: