Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
VCCodeUnion Object

VCCodeUnion Object

Visual Studio .NET 2003

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

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

Remarks

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

Requirements

Namespace: Microsoft.VisualStudio.VCCodeModel

File: vcpkg.dll

Example

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

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

See Also

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

Show:
© 2015 Microsoft