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)
Syntax
'Declaration
<GuidAttribute("DF69B05D-2447-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeElement
'Usage
Dim instance As VCCodeElement
[GuidAttribute("DF69B05D-2447-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeElement
[GuidAttribute(L"DF69B05D-2447-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeElement
public interface VCCodeElement
Remarks
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.
Note
A large part of the functionality of this object is provided by the Visual Studio CodeElement object. For more information, see CodeElement object.
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
Examples
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