VCManagedResourceCompilerTool.DefaultLocalizedResources 属性
获取指示给定的 .resx 文件是否的值导致对默认资源或附属 DLL。
命名空间: Microsoft.VisualStudio.VCProjectEngine
程序集: Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)
语法
声明
ReadOnly Property DefaultLocalizedResources As Boolean
bool DefaultLocalizedResources { get; }
property bool DefaultLocalizedResources {
bool get ();
}
abstract DefaultLocalizedResources : bool with get
function get DefaultLocalizedResources () : boolean
属性值
类型:System.Boolean
true ,如果 .resx 文件错误引起默认资源或附属 DLL;否则, false。
备注
此属性为项目中的各个 .resx 文件才有意义的而不是项目。
有关如何编译和运行此示例的信息,请参见 如何:编译项目模型扩展性示例代码 。
示例
' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a
' Visual C++ project loaded before running this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim prj As VCProject
Dim cfgs, tools As IVCCollection
Dim cfg As VCFileConfiguration
Dim tool As VCManagedResourceCompilerTool
Dim file As VCFile
prj = DTE.Solution.Projects.Item(1).Object
file = prj.Files("Form1.resx")
cfgs = file.FileConfigurations
cfg = cfgs.Item(1)
tool = cfg.Tool
MsgBox("Default localized resources?: " & _
tool.DefaultLocalizedResources.ToString)
End Sub
End Module
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。