IPreferences.Get<T>(String, T, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the value for a given key, or the default specified if the key does not exist.
public T Get<T>(string key, T defaultValue, string? sharedName = default);
abstract member Get : string * 'T * string -> 'T
Public Function Get(Of T) (key As String, defaultValue As T, Optional sharedName As String = Nothing) As T
Type Parameters
- T
The type of the object stored for this preference.
Parameters
- key
- String
The key to retrieve the value for.
- defaultValue
- T
The default value to return when no existing value for key
exists.
- sharedName
- String
Shared container name.
Returns
T
Value for the given key, or the value in defaultValue
if it does not exist.
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.