EnumUtility.TryParse<T> method (1 of 4)

Attempts to parse the specified string.

public static T? TryParse<T>(string? value)
    where T : struct, Enum
parameter description
T The enumerated value type.
value The string.

Return Value

A strongly typed enumerated value; or null if the string could not be successfully parsed.

Remarks

This method matches case.

See Also


EnumUtility.TryParse<T> method (2 of 4)

Attempts to parse the specified string.

public static T? TryParse<T>(string? value, CaseSensitivity caseSensitivity)
    where T : struct, Enum
parameter description
T The enumerated value type.
value The string.
caseSensitivity The case sensitivity.

Return Value

A strongly typed enumerated value; null if the string could not be successfully parsed.

See Also


EnumUtility.TryParse<T> method (3 of 4)

Attempts to parse the specified string.

public static bool TryParse<T>(string? value, out T result)
    where T : struct, Enum
parameter description
T The enumerated value type.
value The string.
result The resulting enumerated value.

Return Value

True if the string was successfully parsed.

Remarks

This method matches case.

See Also


EnumUtility.TryParse<T> method (4 of 4)

Attempts to parse the specified string.

public static bool TryParse<T>(string? value, CaseSensitivity caseSensitivity, out T result)
    where T : struct, Enum
parameter description
T The enumerated value type.
value The string.
caseSensitivity The case sensitivity.
result The resulting enumerated value.

Return Value

True if the string was successfully parsed.

Remarks

This method ignores case.

See Also