Export (0) Print
Expand All

VCCodeUsing Interface 

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

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

[GuidAttribute("17730D55-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeUsing
/** @attribute GuidAttribute("17730D55-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeUsing
GuidAttribute("17730D55-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeUsing

The VCCodeUsing object represents a #using code element in a source file, allowing access to information about that specific code element.

See Samples for Code Model Extensibility for information on how to compile and run this sample.

This example retrieves the first VCCodeUsing object of the current solution and displays it in a message box.

Sub GetFirstUsing()
    Dim vcCM As VCCodeModel
    Dim vcUsing As VCCodeUsing
    vcCM = DTE.Solution.Item(1).CodeModel
    vcUsing = vcCM.Usings.Item(1)
    MsgBox(vcUsing.DisplayName)
End Sub
Show:
© 2014 Microsoft