ISettingsList.GetValueOrDefault<T>(String, T) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Retorna o valor correspondente à chave fornecida. Retorna defaultValue se o valor está ausente ou não é analisável como T .
template <typename T>
T GetValueOrDefault(std::wstring const & key, T defaultValue = null);
public T GetValueOrDefault<T> (string key, T defaultValue = default);
abstract member GetValueOrDefault : string * 'T -> 'T
Public Function GetValueOrDefault(Of T) (key As String, Optional defaultValue As T = Nothing) As T
Parâmetros de tipo
- T
Tipo do valor.
Parâmetros
- key
- String
A chave.
- defaultValue
- T
O valor padrão.
Retornos
- T
Retorna Task.
Exceções
Lançado quando key é nulo.
Gerado quando key está vazio.