VCCodeNamespace - интерфейс
An object representing a namespace element in the source code of a solution.
Пространство имен: Microsoft.VisualStudio.VCCodeModel
Сборка: Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)
Синтаксис
'Декларация
<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
Заметки
The VCCodeNamespace object represents namespace declarations and is a superset of the VCCodeElement object.
Примечание. |
---|
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.
Примеры
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