Skip to main content
Skip table of contents

GetSetting Method

Gets a Setting from the NodeSettings dictionary by setting name.

CODE
public Setting GetSetting(string name);

Classes: Settings


Parameters

value name

Setting name corresponding with the dictionary key inside of NodeSettings.

Returns

Setting

A setting object.


Example

The following example demonstrates getting a list setting and checking the type before accessing the appropriate value on the setting.

CODE
var setting = Settings.GetSetting("List Setting");
if (setting.Type != SettingType.List)
	throw new Exception("List setting had an unexpected type");
var list = setting.ListValue;

foreach (var value in list) 
{
	// ...
}

Remarks

Throws a KeyNotFoundException if no setting exists by the parameter name.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.