مشاركة عبر


VCCodeImport Interface

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

Namespace:  Microsoft.VisualStudio.VCCodeModel
Assembly:  Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)

Syntax

'إقرار
<GuidAttribute("E6CC47B0-2298-4689-8774-7F8D6A361D73")> _
Public Interface VCCodeImport
'الاستخدام
Dim instance As VCCodeImport
[GuidAttribute("E6CC47B0-2298-4689-8774-7F8D6A361D73")]
public interface VCCodeImport
[GuidAttribute(L"E6CC47B0-2298-4689-8774-7F8D6A361D73")]
public interface class VCCodeImport
[<GuidAttribute("E6CC47B0-2298-4689-8774-7F8D6A361D73")>]
type VCCodeImport =  interface end
public interface VCCodeImport

Remarks

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.

Examples

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

See Also

Reference

VCCodeImport Members

Microsoft.VisualStudio.VCCodeModel Namespace