VB .NET Configuration

The .config file for a VB .NET application can have nearly any structure you want (as long as it's XML), but the base element must always be <configuration>. Let's look at an example in Listing 13.1.

Listing 13.1. A Sample .config File
<configuration>
   <configSections>
      <!-- handlers here-->
   </configSections>
   <myruntime>
      <!-- runtime configuration settings here -->
   </myruntime>
   <appSettings>
      <!--application specific settings -->
    </appSettings>
</configuration>

The .config files are created for you in an ASP.NET application, and they are always called Web.config. With any other type of project, you have to manually create the .config files, and they are the name of the application. For example, an application named App1 ...

Get A Programmer's Introduction to Visual Basic® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.