مشاركة عبر


VCCodeInclude Interface

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

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

Syntax

'إقرار
<GuidAttribute("D573FDE6-44C3-4466-8CDF-D0306766026C")> _
Public Interface VCCodeInclude
'الاستخدام
Dim instance As VCCodeInclude
[GuidAttribute("D573FDE6-44C3-4466-8CDF-D0306766026C")]
public interface VCCodeInclude
[GuidAttribute(L"D573FDE6-44C3-4466-8CDF-D0306766026C")]
public interface class VCCodeInclude
[<GuidAttribute("D573FDE6-44C3-4466-8CDF-D0306766026C")>]
type VCCodeInclude =  interface end
public interface VCCodeInclude

Remarks

The VCCodeInclude object represents a #include 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 all #include code elements of the current solution and displays their content in a message box.

Sub GetAllIncludes()
    Dim vcCM As VCCodeModel
    Dim vcInclude As VCCodeInclude
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcInclude in vcCM.Includes
        MsgBox(vcInclude.DisplayName)
    Next
End Sub

See Also

Reference

VCCodeInclude Members

Microsoft.VisualStudio.VCCodeModel Namespace