get_enum


Description:

[ Version ( since = "2.26" ) ]
public int get_enum (string key)

Gets the value that is stored in this for key and converts it to the enum value that it represents.

In order to use this function the type of the value must be a string and it must be marked in the schema file as an enumerated type.

It is a programmer error to give a key that isn't contained in the schema for this or is not marked as an enumerated type.

If the value stored in the configuration database is not a valid value for the enumerated type then this function will return the default value.

Parameters:

this

a Settings object

key

the key to get the value for

Returns:

the enum value