다음을 통해 공유


EnumHelper.TryParseEnum(IEdmEnumType, String, Boolean, Int64) 메서드

정의

열거형 리터럴 값을 정수로 구문 분석합니다. 리터럴 값은 열거형 멤버 이름(예: "Red"), 기본 값(예: "2") 또는 결합된 값(예: "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

매개 변수

enumType
IEdmEnumType

edm 열거형 형식

value
String

입력 문자열 값

ignoreCase
Boolean

대/소문자를 구분하지 않는 경우 true, 대/소문자를 구분하는 경우 false

parseResult
Int64

구문 분석 결과

반환

구문 분석이 성공하면 true, 구문 분석이 실패하면 false입니다.

적용 대상