Configuration Information for dlls in .NET

I have inherited a project that has class libraries written in VB.NET, some of these have ".settings" files and the others have a ".dll.config" file to store connection strings. What is the difference between these 2 methods?

EDIT: In what scenarios would I prefer one over the other?


They're basically the same thing - or strongly related, anyway. A settings file gives you strongly-typed access to entries in an app.config file, and keeps them in sync. When you compile, the app.config file is copied to the bin folder with the name of your assembly.

Note that, if you modify the .config file by hand, you can lose changes if the settings file overwrites them. In VS2008 it will prompt you, so you can choose to sync them.

I think that .settings is application wide, while the .dll.config files are specific to the assembly they are named for.

".config" files are at the core of .NET configuration system. They store the actual configuration data. In the early .NET framework, if you wanted to extend the configuration system to handle your custom configuration data, you had to do this manually. "Settings" file is a feature that allows you to visually define configuration options and use them to create a strongly typed class. This class can then be used as a method to read and manipulate the configuration data specified in application's ".config" file at runtime. They also provide some neat features automatically, such as defining per-user or per-application configuration options. They greatly reduce the hassle to manually extend the configuration system.

Need Your Help

Character mapping / search and replace character by character in SQL Server 2008 R2

sql sql-server sql-server-2008

I am running on SQL Server 2008 R2 and we have a requirement here whereby I need to create replace certain English characters to locale language characters used previously in legacy system.

is it possible to build and new a structure in a loop?


I want to know that How can I walk through this loop ?