' Get appSettings.
Shared Sub GetAppSettings()
' Get the appSettings.
Dim appSettings As NameValueCollection = _
ConfigurationManager.AppSettings
' Get the collection enumerator.
Dim appSettingsEnum As IEnumerator = _
appSettings.Keys.GetEnumerator()
' Loop through the collection and
' display the appSettings key, value pairs.
Dim i As Integer = 0
While appSettingsEnum.MoveNext()
Dim key As String = appSettings.Keys(i)
Console.WriteLine("Name: {0} Value: {1}", _
key, appSettings(key))
i += 1
End While
End Sub 'GetAppSettings