Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MatchTimeout Property
Collapse the table of content
Expand the table of content

RegexMatchTimeoutException.MatchTimeout Property

.NET Framework 4.6 and 4.5

Gets the time-out interval for a regular expression match.

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

public TimeSpan MatchTimeout { get; }

Property Value

Type: System.TimeSpan
The time-out interval.

This property reflects the value of the matchTimeout parameter of the RegexMatchTimeoutException(String, String, TimeSpan) constructor. If the parameter is not properly initialized in a constructor call, its value is Timespan.FromTicks(-1).

The value of this property reflects the time-out interval set in the call to the Regex constructor or static method. It does not reflect the exact interval that has elapsed from the beginning of the method call to the time the exception is thrown.

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
© 2015 Microsoft