AppSettingsReader::GetValue Method (String^, Type^)
.NET Framework (current version)
Gets the value for a specified key from the AppSettings property and returns an object of the specified type containing the value from the configuration.
Assembly: System (in System.dll)
Parameters
- key
-
Type:
System::String^
The key for which to get the value.
- type
-
Type:
System::Type^
The type of the object to return.
| Exception | Condition |
|---|---|
| ArgumentNullException | key is null. - or - type is null. |
| InvalidOperationException | key does not exist in the <appSettings> configuration section. - or - The value in the <appSettings> configuration section for key is not of type type. |
.NET Framework
Available since 1.1
Available since 1.1
Show: