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

Tries to parse a given value as an enumeration. Even if value is numeric, this method still ensures that given number is among the enumerated constants. This differs in behavior from Enum.Parse, which accepts any valid numeric string (that fits into enumeration's base type).

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

Syntax

   
 C# 
public static bool TryParse<TEnum>(
	string value,
	out TEnum output,
	bool ignoreCase
)

Parameters

value
String
Raw string value to parse.
output
TEnum%
Parsed enumeration to output. Set to default(TEnum) on failure.
ignoreCase
Boolean
Whether parsing should be case-insensitive.

Type Parameters

TEnum
Enumeration type.

Return Value

Whether parsing succeeded.

See Also