IsolatedStorageSettings.TryGetValue<(Of <(T>)>) Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets a value for the specified key.

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

Syntax

Public Function TryGetValue(Of T) ( _
    key As String, _
    <OutAttribute> ByRef value As T _
) As Boolean
public bool TryGetValue<T>(
    string key,
    out T value
)

Type Parameters

  • T
    The Type of the value parameter.

Parameters

  • 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.

Exceptions

Exception Condition
ArgumentNullException

key is nullNothingnullptra null reference (Nothing in Visual Basic).

InvalidCastException

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

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

See Also

Reference

IsolatedStorageSettings Class

System.IO.IsolatedStorage Namespace