Reading Application Settings
You can still write the XML appSettings section of an App.config file yourself, but in .NET 2005 the project’s properties can be managed visually. The Settings tab permits you to manage application settings without requiring you to know XML. The setting shown in Figure 2 can be at the end of Listing 4. The My feature code used to read the application settings is shown in Listing 6.
Figure 2 The figure shows the data key that will be added to the App.config file’s application settings section by the IDE.
Listing 6 Using the My feature to read the application settings managed by the IDE.
Sub ReadAppSettings() Dim s As String = My.MySettings.Default("data") Console.WriteLine(s) Console.ReadLine() End Sub