Edit

Share via


ISettingsStorageHelperExtensions.Read<TKey,TValue> Method

Definition

Read the key in the storage helper instance and get the value.

public static TValue? Read<TKey,TValue> (this Microsoft.Toolkit.Helpers.ISettingsStorageHelper<TKey> storageHelper, TKey key);
static member Read : Microsoft.Toolkit.Helpers.ISettingsStorageHelper<'Key> * 'Key -> 'Value
<Extension()>
Public Function Read(Of TKey, TValue) (storageHelper As ISettingsStorageHelper(Of TKey), key As TKey) As TValue

Type Parameters

TKey

The type of key used to lookup the object.

TValue

The type of object value expected.

Parameters

storageHelper
ISettingsStorageHelper<TKey>

The storage helper instance fo read from.

key
TKey

The key of the target object.

Returns

TValue

The value of the target object

Exceptions

Throws when the key is not found in storage.

Applies to