다음을 통해 공유


ISettingsManager.GetValueOrDefault<T>(String, T) Method

Definition

Returns the value of a property, or the default if the value is not set.

template <typename T>
 T GetValueOrDefault(std::wstring const & name, T defaultValue = null);
public T GetValueOrDefault<T> (string name, T defaultValue = default);
abstract member GetValueOrDefault : string * 'T -> 'T
Public Function GetValueOrDefault(Of T) (name As String, Optional defaultValue As T = Nothing) As T

Type Parameters

T

The type of the setting.

Parameters

name
String

The name of the setting.

defaultValue
T

The default value.

Returns

T

Returns ISettingsSubset.

Exceptions

Thrown when name is null.

Thrown when name is empty.

Remarks

This method is safe to access from any thread.

Applies to