Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

read string from .resx file in C#

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

like image 954
Red Swan Avatar asked Oct 02 '09 09:10

Red Swan


People also ask

How do I get .resx file strings in asp net core?

Create a folder in whatever project you want to store the resx files in - default, call it "Resources". Create a new resx file with the specific culture and the file name you'll look up later: If you had a shared one, you could do: SharedResource. en-US. resx.

What is .resx file in C#?

Resource file used by programs developed with Microsoft's . NET Framework; stores objects and strings for a program in an XML format; may contain both plain text information as well as binary data, which is encoded as text within the XML tags.


1 Answers

ResourceManager shouldn't be needed unless you're loading from an external resource.
For most things, say you've created a project (DLL, WinForms, whatever) you just use the project namespace, "Resources" and the resource identifier. eg:

Assuming a project namespace: UberSoft.WidgetPro

And your resx contains:

resx content example

You can just use:

Ubersoft.WidgetPro.Properties.Resources.RESPONSE_SEARCH_WILFRED 
like image 97
nathanchere Avatar answered Oct 02 '22 08:10

nathanchere