开发者

reading a string from resx file sharpdevelop c#

I'm writing a class 开发者_运维技巧library in C# using sharp develop. I am including an resx(resource) file which contains some string values. I'm using the following code:

ResourceManager rm = new ResourceManager("ResourceFileName",this.GetType().Assembly);
string str=rm.GetString("Keyname");

It compiles fine. At run time, it gives me the following error:

Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "ResourceFileName.resources" was correctly embedded or linked into assembly "myassembly" at compile time, or that all the satellite assemblies required are loadable and fully signed.

The question is that is it not possible to use resx file in Sharpdevelop?? If yes, then how to resolve this problem.

Thanks and Regards,

Vamyip


In the first argument use full name of resource class "namespace.classname" in secound argument

 Assembly.GetExecutingAssembly()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜