VCCodeElement - интерфейс
An object providing access to any code element within a source file.
Пространство имен: Microsoft.VisualStudio.VCCodeModel
Сборка: Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)
Синтаксис
'Декларация
<GuidAttribute("DF69B05D-2447-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeElement
'Применение
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
Заметки
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.
Примечание. |
---|
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.
Примеры
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