Freigeben über


VCFileCodeModel.AddUnion(String, Object, vsCMAccess) Method

Definition

Adds a union statement to the object.

Microsoft::VisualStudio::VCCodeModel::VCCodeUnion AddUnion(std::wstring const & Name, winrt::Windows::Foundation::IInspectable const & Position, EnvDTE::vsCMAccess Access = EnvDTE.vsCMAccess.vsCMAccessDefault);
[System.Runtime.InteropServices.DispId(566)]
public Microsoft.VisualStudio.VCCodeModel.VCCodeUnion AddUnion (string Name, object Position, EnvDTE.vsCMAccess Access = EnvDTE.vsCMAccess.vsCMAccessDefault);
[<System.Runtime.InteropServices.DispId(566)>]
abstract member AddUnion : string * obj * EnvDTE.vsCMAccess -> Microsoft.VisualStudio.VCCodeModel.VCCodeUnion
Public Function AddUnion (Name As String, Optional Position As Object, Optional Access As vsCMAccess = EnvDTE.vsCMAccess.vsCMAccessDefault) As VCCodeUnion

Parameters

Name
String

Required. Specifies the name of the union.

Position
Object

Required. Default = -1. The code element after which to add the event element. If the value is a CodeElement, then the new element is added immediately after it.Because collections begin their count at one, passing 0 indicates that the new element should be placed at the beginning of the collection. A value of -1 means the element should be placed at the end.

Access
vsCMAccess

Optional. A vsCMAccess value.

Returns

A VCCodeUnion object.

Attributes

Applies to