O'Reilly logo

Microsoft® Visual Basic® .NET Programmer's Cookbook by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Read Application Configuration Settings

Problem

You need to store application-specific settings that can be modified easily without recompiling code.

Solution

Read settings from an application configuration file.

Discussion

Configuration files are ideal repositories for information such as directory paths and database connection strings. One useful feature about configuration files is the fact that they are tied to a particular directory, not a particular computer (as a registry setting would be). Thus, if several clients load the same application from the same directory, they will share the same custom settings. However, you might need to add additional security to prevent users from reading or modifying a configuration file that is shared in this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required