OpenNETCF Smart Device Framework 2.3
Assembly: OpenNETCF (in OpenNETCF.dll) Version: 2.3.0.0
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
A parameter specifies whether the operation is case-sensitive.
Namespace:
OpenNETCFAssembly: OpenNETCF (in OpenNETCF.dll) Version: 2.3.0.0
Syntax
| C# |
|---|
public static Object Parse( Type enumType, string value, bool ignoreCase ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Parse ( _ enumType As Type, _ value As String, _ ignoreCase As Boolean _ ) As Object |
| Visual Basic (Usage) |
|---|
Dim enumType As Type Dim value As String Dim ignoreCase As Boolean Dim returnValue As Object returnValue = Enum2.Parse(enumType, _ value, ignoreCase) |
| Visual C++ |
|---|
public: static Object^ Parse( Type^ enumType, String^ value, bool ignoreCase ) |
| J# |
|---|
public static Object Parse( Type enumType, String value, boolean ignoreCase ) |
| JScript |
|---|
public static function Parse( enumType : Type, value : String, ignoreCase : boolean ) : Object |
| JavaScript |
|---|
OpenNETCF.Enum2.Parse = function(enumType, value, ignoreCase); |
Parameters
- enumType
- Type: System..::.Type
The Type of the enumeration.
- value
- Type: System..::.String
A string containing the name or value to convert.
- ignoreCase
- Type: System..::.Boolean
If true, ignore case; otherwise, regard case.
Return Value
An object of type enumType whose value is represented by value.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentException | enumType is not an Enum. -or- value is either an empty string ("") or only contains white space. -or- value is a name, but not one of the named constants defined for the enumeration. |