VCCodeBase - интерфейс
An object providing access to the base class list of the parent object.
Пространство имен: Microsoft.VisualStudio.VCCodeModel
Сборка: Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)
Синтаксис
'Декларация
<GuidAttribute("17730D45-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeBase
'Применение
Dim instance As VCCodeBase
[GuidAttribute("17730D45-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeBase
[GuidAttribute(L"17730D45-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeBase
public interface VCCodeBase
Заметки
The VCCodeBase object provides access to the code element representing the base class list for the parent object, if it exists. You can use this object to retrieve the base class or classes that exist for the parent object.
Примечание. |
---|
This does not represent the actual base class code element. It simply represents the base class names for the parent 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 displays the base classes for each class in the current project.
Sub GetBases()
Dim vcCM As VCCodeModel
Dim vcClass As VCCodeClass
Dim vcBase As VCCodeBase
Dim i As Integer
vcCM = DTE.Solution.Item(1).CodeModel
For Each vcClass In vcCM.Classes
For i = 1 To vcClass.Bases.Count
vcBase = vcClass.Bases.Item(1)
MsgBox(vcClass.Name + " derives from " + vcBase.Name)
Next
Next
End Sub