Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

An enum containing the possible object types of a Setting.

public enum SettingType

Fields

String

0

String type.

Int

1

Integer type.

Boolean

2

Boolean type.

List

3

List of strings.

ImportLocation

4

String corresponding to a file import path.


Example

The following example demonstrates checking the SettingType of a setting before accessing the appropriate value field.

var setting = Settings.GetSetting("String Setting");
if (setting.Type != SettingType.String)
    throw new Exception("Unexpected setting type.");
var settingValue = setting.StringValue;
  • No labels