[This is preliminary documentation and is subject to change.]

Attempts to parse a given key's value as an enumeration. An ArgumentException is thrown if value could not be parsed. Note the parsing is done in a case-insensitive way.

Namespace: fCraft
Assembly: fCraft (in fCraft.dll) Version: 0.6.2.4 (0.6.2.4)

Syntax

   
 C# 
public static TEnum GetEnum<TEnum>(
	this ConfigKey key
)
where TEnum : struct, new()

Parameters

key
ConfigKey

[Missing <param name="key"/> documentation for "M:fCraft.Config.GetEnum``1(fCraft.ConfigKey)"]

Type Parameters

TEnum
Enum to use for parsing. An ArgumentException will be thrown if this is not an enum.

Return Value

[Missing <returns> documentation for "M:fCraft.Config.GetEnum``1(fCraft.ConfigKey)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ConfigKey. When you use instance method syntax to call this method, omit the first parameter.

See Also