对ResourceManager.GetString()的理解与运用--------个人笔记

需要在资源文件中添加所需的文件,字符串,图片等资源

//需要添加对资源文件的引用
using System.Resources;
using WindowsFormsApplication1.Properties;

ResourceManager manager = new ResourceManager(typeof(Resources));//实例化
string result = manager.GetString("name");//取值
//值来自于Properties.Resources.resx资源文件
//可直接打开写入值,文件,图片等
this.label1.Text = result;//赋值

OK,这就是关于ResourceManager.GetString()这个方法的值得来源介绍!个人笔记,欢迎指点问题!

发布了22 篇原创文章 · 获赞 11 · 访问量 7851

猜你喜欢

转载自blog.csdn.net/DK18397606232/article/details/102587018