Condividi tramite


Proprietà VCCLCompilerTool.ForceConformanceInForLoopScope

Ottiene o imposta un valore che indica se imporre al compilatore di conformarsi all'ambito locale in un ciclo For. L'oggetto ForceConformanceInForLoopScope espone la funzionalità dell'opzione /Zc:forScope (Imponi conformità nell'ambito di un ciclo For) del compilatore.

Spazio dei nomi:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Sintassi

'Dichiarazione
Property ForceConformanceInForLoopScope As Boolean
bool ForceConformanceInForLoopScope { get; set; }
property bool ForceConformanceInForLoopScope {
    bool get ();
    void set (bool value);
}
abstract ForceConformanceInForLoopScope : bool with get, set
function get ForceConformanceInForLoopScope () : boolean 
function set ForceConformanceInForLoopScope (value : boolean)

Valore proprietà

Tipo: Boolean
true se al compilatore viene imposto di conformarsi all'ambito locale in un ciclo For; in caso contrario, false.

Esempi

Vedere Procedura: compilare codice di esempio per l'Extensibility del modello di progetto per informazioni su come compilare ed eseguire l'esempio.

Nell'esempio riportato di seguito la proprietà ForceConformanceInForLoopScope nell'ambiente di sviluppo integrato (IDE):

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCCLCompilerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCCLCompilerTool")
        tool.ForceConformanceInForLoopScope = True
    End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCCLCompilerTool Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine