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


VCCodeVariable - интерфейс

An object representing a variable construct in a source file.

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

Синтаксис

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

Заметки

The VCCodeVariable object is used to modify an existing variable construct.

ПримечаниеПримечание.

A large part of the functionality of this object is provided by the Visual Studio CodeVariable object. For more information, see CodeVariable 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 all variables of the current solution and displays each name in a message box. It assumes a default MFC project is open.

Sub GetAllVars()
    Dim vcCM As VCCodeModel
    Dim vcVar As VCCodeVariable
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcVar in vcCM.Variables
        MsgBox(vcVar.DisplayName)
    Next
End Sub

См. также

Ссылки

VCCodeVariable - члены

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