Arif YILMAZ
Arif YILMAZ

Reputation: 5866

how to read/write resource file in .net winform

I am trying to read/write the resource file but couldnt succeed. It seems very easy but I couldnt understand why it gives an exception. the exception is "System.Resources.MissingManifestResourceException"

I named the .resx file to Settings.resx and my code is like below

ResourceManager rm = new ResourceManager("Settings", Assembly.GetExecutingAssembly());
String str = rm.GetString("merkez_bankasi_url");
Console.WriteLine(str);

should it be inside a specific folder for the system to find the resource file?

Upvotes: 0

Views: 2091

Answers (1)

juanvan
juanvan

Reputation: 681

In my Resources I put in a String GoogleURL and a value http://www.google.com

    Console.Writeline(Resources.GoogleURL);

or in your case

    Console.Writeline(Resources.merkez_bankasi_url);

Upvotes: 2

Related Questions