Table of Contents

FromEnum Method

Definition

Namespace
Cuemon.Text
Assemblies
Cuemon.Core.dll
Source
src/Cuemon.Core/Text/ParserFactory.cs

FromEnum()

Creates a parser that converts a string to its equivalent Enum.

public static IConfigurableParser<EnumStringOptions> FromEnum()

Returns

IConfigurableParser<EnumStringOptions>

An IConfigurableParser<TOptions> implementation.

Exceptions

ArgumentNullException

string cannot be null -or- Type cannot be null.

ArgumentException

string cannot be empty or consist only of white-space characters -or- Type does not represents an enumeration.

OverflowException

string is outside the range of the underlying type of Type.

InvalidOperationException

string is not type SByte, Int16, Int32, Int64, Byte, UInt16, UInt32, or UInt64, or String.