Regex Constructor (SerializationInfo, StreamingContext)

 

Initializes a new instance of the Regex class by using serialized data.

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

Protected Sub New (
	info As SerializationInfo,
	context As StreamingContext
)

Parameters

info
Type: System.Runtime.Serialization.SerializationInfo

The object that contains a serialized pattern and RegexOptions information.

context
Type: System.Runtime.Serialization.StreamingContext

The destination for this serialization. (This parameter is not used; specify null.)

Exception Condition
ArgumentException

A regular expression parsing error occurred.

ArgumentNullException

The pattern that info contains is null.

ArgumentOutOfRangeException

info contains an invalid RegexOptions flag.

.NET Framework
Available since 2.0
Return to top
Show: