Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

VCCodeUnion Interface 

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

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

[GuidAttribute("17730D51-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeUnion
/** @attribute GuidAttribute("17730D51-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeUnion
GuidAttribute("17730D51-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeUnion

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

See Samples for 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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.