VCCodeBase Interface
An object providing access to the base class list of the parent object.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Syntax
'Declaration
<GuidAttribute("17730D45-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeBase
'Usage
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
Remarks
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.
Note
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.
Examples
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