Export (0) Print
Expand All

ConfigurationManager.AppSettings Property

Note: This property is new in the .NET Framework version 2.0.

Gets the AppSettingsSection data for the current application's default configuration.

Namespace: System.Configuration
Assembly: System.Configuration (in system.configuration.dll)

public:
static property NameValueCollection^ AppSettings {
	NameValueCollection^ get ();

/** @property */
public static NameValueCollection get_AppSettings ()

public static function get AppSettings () : NameValueCollection

Property Value

Returns a NameValueCollection object containing the contents of the AppSettingsSection object for the current application's default configuration.

Exception typeCondition

ConfigurationErrorsException

Could not retrieve a NameValueCollection object with the application settings data.

A AppSettingsSection object contains the contents of the configuration file's appSettings section.

The following code example shows how to get a named application setting using the AppSettings property.

No code example is currently available or this language may not be supported.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft