[英]how to change disabled access modifier of lang.resx within App-GlobalResources folder to public?
I am trying to use resources(language) within App-GlobalResources folder. 我正在尝试使用App-GlobalResources文件夹中的资源(语言)。 But when i run the project it says this;
但是,当我运行该项目时,它会说:
Cannot retrieve property 'Name' because localization failed.
由于本地化失败,无法检索属性“名称”。 Type 'Resources.lang' is not public or does not contain a public static string property with the name 'Username'.
类型“ Resources.lang”不是公共的,或者不包含名称为“用户名”的公共静态字符串属性。
Access modifier is disabled so i can not change it to public which i think it is the source of problem, i am not sure though. 访问修饰符已禁用,因此我无法将其更改为公开,我认为这是问题的根源,但我不确定。
How can i get it work? 我该如何运作?
For solution:
Select the file in the Solution Explorer and go to it's properties by right-clicking on the file or by pressing F4. 在解决方案资源管理器中选择文件,然后通过右键单击文件或按F4进入其属性。
In the properties window for this file, you can change the access modifier of the file from Protected to Public. 在此文件的属性窗口中,可以将文件的访问修饰符从“受保护”更改为“公共”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.