共用方式為


VCCLCompilerTool.TreatWChar_tAsBuiltInType 屬性

取得或設定值,指出是否將 wchar_t 為內建型別。 TreatWChar_tAsBuiltInType 會公開編譯器之 /Zc:wchar_t (wchar_t 是原生型別) 選項的功能。

命名空間:  Microsoft.VisualStudio.VCProjectEngine
組件:  Microsoft.VisualStudio.VCProjectEngine (在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

語法

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

屬性值

型別:System.Boolean
如果將 wchar_t 視為內建型別則為 true,否則為 false。

範例

請參閱HOW TO:編譯專案模型擴充性的範例程式碼如需有關如何編譯及執行這個範例資訊。

下列範例會修改TreatWChar_tAsBuiltInType在整合式的開發環境 (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.TreatWChar_tAsBuiltInType = False
    End Sub
End Module

.NET Framework 安全性

請參閱

參考

VCCLCompilerTool 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間