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


VCCodeUnion - интерфейс

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

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

Синтаксис

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

Заметки

The VCCodeUnion object is used to modify an existing union construct.

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 name of each union code element in the current solution. It assumes a C++ project is open and that it has global unions.

Sub GetAllUnions()
    Dim vcCM As VCCodeModel
    Dim vcUnion As VCCodeUnions
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcUnion in vcCM.Unions
        MsgBox(vcUnion.DisplayName)
    Next
End Sub

См. также

Ссылки

VCCodeUnion - члены

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