MatchTimeout Property
Collapse the table of content
Expand the table of content

Regex.MatchTimeout Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets the time-out interval of the current instance.

Namespace:  System.Text.RegularExpressions
Assembly:  System (in System.dll)

'Declaration
Public ReadOnly Property MatchTimeout As TimeSpan

Property Value

Type: System.TimeSpan
The maximum time interval that can elapse in a pattern-matching operation before a RegexMatchTimeoutException is thrown, or Regex.InfiniteMatchTimeout if time-outs are disabled.

The MatchTimeout property defines the approximate maximum time interval for a Regex instance to execute a single matching operation before the operation times out. The regular expression engine throws a RegexMatchTimeoutException exception during its next timing check after the time-out interval has elapsed.

This property is read-only. You can set its value explicitly for an individual Regex object by calling the Regex.Regex(String, RegexOptions, TimeSpan) constructor.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft