从C#中的.resx文件中读取字符串 [英] read string from .resx file in C#

查看:1088
本文介绍了从C#中的.resx文件中读取字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

喜 如何阅读从C#的.resx文件中的字符串?请给我指引。一步一个脚印

Hi How to read the string from .resx file in c#? please send me guidelines . step by step

推荐答案

这个例子是从的上ResourceManager.GetString MSDN网页()

// Create a resource manager to retrieve resources.
ResourceManager rm = new ResourceManager("items", Assembly.GetExecutingAssembly());

// Retrieve the value of the string resource named "welcome".
// The resource manager will retrieve the value of the  
// localized resource using the caller's current culture setting.
String str = rm.GetString("welcome");

这篇关于从C#中的.resx文件中读取字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆