RegexMatchExtensions.Get<T> method (1 of 2)

Returns a value of the specified type for the match.

public static T Get<T>(this Match match)
parameter description
T The desired type. See RegexMatchExtensions for supported types.
match The match.

Return Value

The corresponding value of the specified type.

Exceptions

exception condition
FormatException The text of the capture cannot be parsed as the specified type.
InvalidOperationException The match failed, or the specified type is not supported.

See Also


RegexMatchExtensions.Get<T> method (2 of 2)

Returns a value of the specified type for the match.

public static T Get<T>(this Match match, params string[] groupNames)
parameter description
T The desired type. See RegexMatchExtensions for supported types.
match The match.
groupNames The group names to return.

Return Value

The corresponding value of the specified type.

Exceptions

exception condition
FormatException The text of the capture cannot be parsed as the specified type.
InvalidOperationException The match failed, or the specified type is not supported.

See Also