EnumHelper.TryParseEnum(IEdmEnumType, String, Boolean, Int64) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Parse an enum literal value to integer. The literal value can be Enum member name (e.g. "Red"), underlying value (e.g. "2"), or combined values (e.g. "Red, Green, Blue", "1,2,4").
public static bool TryParseEnum (this Microsoft.OData.Edm.IEdmEnumType enumType, string value, bool ignoreCase, out long parseResult);
static member TryParseEnum : Microsoft.OData.Edm.IEdmEnumType * string * bool * int64 -> bool
<Extension()>
Public Function TryParseEnum (enumType As IEdmEnumType, value As String, ignoreCase As Boolean, ByRef parseResult As Long) As Boolean
Parameters
- enumType
- IEdmEnumType
edm enum type
- value
- String
input string value
- ignoreCase
- Boolean
true if case insensitive, false if case sensitive
- parseResult
- Int64
parse result
Returns
true if parse succeeds, false if parse fails