What is the difference between .resx and .config files in .NET?

When should I use .resx file and when go for .config file?

What is the basic difference between the both in terms of usage?

Answers


If you have some text in a page that you would like to display differently for different languages, or be able to modify without recompiling your application, you can put this into a resource file.

The config file contains application configurations. The config file is a (more) secure location for holding information, and should be kept as small as possible. You will also only have one configuration file per application instance (or at least project), while you may have many resource files, for instance a web project may have a resource file per web page.


resx are for localizable resources. You also need them for non-string resources. .config, as its name suggests is for configuration information


Use a config for application settings that apply to everyone and a resx for resource data and information that might differ by language/culture (such as labels and error strings)


Need Your Help

UINavigationBar with Search icon - push modal search view when clicked

ios uiviewcontroller uinavigationcontroller uisearchbar uisearchdisplaycontroller

I am creating a Navigation-Based application. The nav bar has a search icon; when it is clicked I push a SearchViewController onto the navigation controller (containing a search bar and tableview)....

Tool to Migrate from SVN to TFS

svn tfs migration tfs-migration

Can anyone suggest a tool for migrating from SVN to TFS? Preferably this would be Open Source.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.