Поделиться через


VCCodeImport - интерфейс

An object representing a #import code element in the source code of a solution.

Пространство имен:  Microsoft.VisualStudio.VCCodeModel
Сборка:  Microsoft.VisualStudio.VCCodeModel (в Microsoft.VisualStudio.VCCodeModel.dll)

Синтаксис

'Декларация
<GuidAttribute("17730D54-271F-11D7-8BF6-00B0D03DAA06")> _
Public Interface VCCodeImport
'Применение
Dim instance As VCCodeImport
[GuidAttribute("17730D54-271F-11D7-8BF6-00B0D03DAA06")]
public interface VCCodeImport
[GuidAttribute(L"17730D54-271F-11D7-8BF6-00B0D03DAA06")]
public interface class VCCodeImport
public interface VCCodeImport

Заметки

The VCCodeImport object represents a #import code statement in a source file, allowing access to information about the specific code element.

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 first VCCodeImport object of the current solution and displays it in a message box. It assumes that a C++ project containing a #import statement is open.

Sub GetFirstImport()
    Dim vcCM As VCCodeModel
    Dim vcImport As VCCodeImport
    vcCM = DTE.Solution.Item(1).CodeModel
    vcImport = vcCM.Imports.Item(1)
    MsgBox(vcImport.DisplayName)
End Sub

См. также

Ссылки

VCCodeImport - члены

Microsoft.VisualStudio.VCCodeModel - пространство имен