VCCodeNamespace Interface
An object representing a namespace element in the source code of a solution.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Syntax
<GuidAttribute("17730D4D-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeNamespace
Dim instance As VCCodeNamespace
[GuidAttribute("17730D4D-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeNamespace
[GuidAttribute(L"17730D4D-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeNamespace
public interface VCCodeNamespace
Remarks
The VCCodeNamespace object represents namespace declarations and is a superset of the VCCodeElement object.
Nota
A large part of the functionality of this object is provided by the Visual Studio CodeNamespace object. For more information, see CodeNamespace 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 retrieves the namespaces of the current solution and displays each name in a message box.
Sub AllNamespaces()
Dim codeModel As VCCodeModel
codeModel = DTE.Solution.Item(1).CodeModel
Dim namespace As VCCodeNamespace
For Each namespace In codeModel.Namespaces
MsgBox(namespace.DisplayName)
Next
End Sub