BaseSettingsElement.GetSetting<T> Method (String, T)

<< Click to Display Table of Contents >>

Navigation:  Reference > BNCS Namespace > BaseSettingsElement Class > BaseSettingsElement Methods > GetSetting Method  >

BaseSettingsElement.GetSetting<T> Method (String, T)

Retrieves a setting value of type T from the settings dictionary. If the setting does not exist, returns the default value provided.

Namespace: BNCS
Assembly:  BNCS.Core.DriverFramework (in BNCS.Core.DriverFramework.dll)

 

Syntax


public T GetSetting<T>(
 string SettingId,
 T defaultValue
)

Type Parameters

T

The type of the setting value to retrieve

Parameters

SettingId

Type: String
The ID of the setting to retrieve

defaultValue

Type: T
The default value to return if the setting does not exist or cannot be converted

Return Value

The setting value of type T if found, otherwise the default value

 

See Also


BaseSettingsElement Class

GetSetting Overload

BNCS Namespace