Cuemon .NET Framework
Parse<TEnum>(String,Boolean) Method

The type of the enumeration to convert.
A string containing the name or value to convert.
true to ignore case; false to regard case.
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated TEnum.
Syntax
'Declaration
 
Public Overloads Shared Function Parse(Of TEnum As {New, IConvertible, Struct})( _
   ByVal value As String, _
   ByVal ignoreCase As Boolean _
) As TEnum
public static TEnum Parse<TEnum>( 
   string value,
   bool ignoreCase
)
where TEnum: new(), IConvertible, struct

Parameters

value
A string containing the name or value to convert.
ignoreCase
true to ignore case; false to regard case.

Type Parameters

TEnum
The type of the enumeration to convert.

Return Value

An enum of type TEnum whose value is represented by value.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionvalue is null.
TypeArgumentExceptionTEnum does not represents an enumeration.
System.ArgumentExceptionvalue does not represents an enumeration.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

EnumUtility Class
EnumUtility Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback