且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

C#:如何从一个特定的文化得到资源字符串

更新时间:2023-02-22 13:01:23

您可以手动更改Foobar的文化属性类的Visual Studio生成。或者,如果您是直接使用 ResourceManager类,可以使用的过载的GetString ,是以所需的文化作为一个参数。

You can manually change the Culture property of the FooBar class that Visual Studio generates. Or if you are directly using the ResourceManager class, you can use the overload of GetString that takes the desired culture as a parameter.