Using ResourceManager

前端 未结 6 1215
走了就别回头了
走了就别回头了 2020-12-08 07:38

I\'m trying to use the ResourceManager in a C# class, but don\'t know what to substitute for the basename when creating a new instance of the ResourceManager class.

6条回答
  •  执笔经年
    2020-12-08 08:01

    According to the MSDN documentation here, The basename argument specifies "The root name of the resource file without its extension but including any fully qualified namespace name. For example, the root name for the resource file named "MyApplication.MyResource.en-US.resources" is "MyApplication.MyResource"."

    The ResourceManager will automatically try to retrieve the values for the current UI culture. If you want to use a specific language, you'll need to set the current UI culture to the language you wish to use.

提交回复
热议问题