GetEnum

public Enum GetEnum(string name, Enum defaultValue) ;

Get the value of the Enum type.

Parameter Name Description
name Name.
defaultValue Default value. It is returned when there is no parameter.

The value of the parameter. If there is no parameter, it returns defaultValue.

public Enum GetEnum(int id, Enum defaultValue) ;

Get the value of the Enum type.

Parameter Name Description
id ID.
defaultValue Default value. It is returned when there is no parameter.

The value of the parameter. If there is no parameter, it returns defaultValue.

public TEnum GetEnum<TEnum>(string name, TEnum defaultValue) ;

Get the value of the Enum type.

Type Parameter Name Description Type Constraints
TEnum Type of enum to get
  • Enum
Parameter Name Description
name Name.
defaultValue Default value. It is returned when there is no parameter.

The value of the parameter. If there is no parameter, it returns defaultValue.

public TEnum GetEnum<TEnum>(string name) ;

Get the value of the Enum type.

Type Parameter Name Description Type Constraints
TEnum Type of enum to get
  • Enum
Parameter Name Description
name Name.

The value of the parameter. If there is no parameter, it returns default(TEnum).

public TEnum GetEnum<TEnum>(int id, TEnum defaultValue) ;

Get the value of the Enum type.

Type Parameter Name Description Type Constraints
TEnum Type of enum to get
  • Enum
Parameter Name Description
id ID.
defaultValue Default value. It is returned when there is no parameter.

The value of the parameter. If there is no parameter, it returns defaultValue.

public TEnum GetEnum<TEnum>(int id) ;

Get the value of the Enum type.

Type Parameter Name Description Type Constraints
TEnum Type of enum to get
  • Enum
Parameter Name Description
id ID.

The value of the parameter. If there is no parameter, it returns default(TEnum).