Export (0) Print
Expand All

VCCodeElement Interface 

An object providing access to any code element within a source file.

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

[GuidAttribute("DF69B05D-2447-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeElement
/** @attribute GuidAttribute("DF69B05D-2447-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeElement
GuidAttribute("DF69B05D-2447-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeElement

The VCCodeElement object provides code model functionality to existing Visual C++ integrated development environment (IDE) solutions at the code element level. Primarily, this object is used to find and modify any code element (class declaration, identifier, function definition, and so on) accessible within a source file.

NoteNote

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

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

This example assigns a newly added class to a VCCodeElement object.

Sub GetVCCodeElement()
    Dim vcCM As VCCodeModel
    Dim vcCodeElement As VCCodeElement
    vcCM = DTE.Solution.Item(1).CodeModel
    vcCodeElement = vcCM.AddClass("MyClass", "MyClass.h")
End Sub
Show:
© 2015 Microsoft