IsolatedStorageSettings.TryGetValue<T> Method

July 28, 2014

Gets a value for the specified key.

Namespace:  System.IO.IsolatedStorage
Assembly:  System.Windows (in System.Windows.dll)

public bool TryGetValue<T>(
	string key,
	out T value
)

Type Parameters

T

The Type of the value parameter.

Parameters

key
Type: System.String
The key of the value to get.
value
Type: T %
When this method returns, the value associated with the specified key if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Return Value

Type: System.Boolean
true if the specified key is found; otherwise, false.

ExceptionCondition
ArgumentNullException

key is null.

InvalidCastException

The type of the value returned from the key cannot be implicitly cast to the type of the value parameter.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft