Regex Constructor (SerializationInfo, StreamingContext)
Initializes a new instance of the Regex class using serialized data.
Assembly: System (in System.dll)
Parameters
- info
- Type: System.Runtime.Serialization.SerializationInfo
The SerializationInfo 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 has occurred. |
| ArgumentNullException | The pattern that info contains is null. |
| ArgumentOutOfRangeException | info contains an invalid RegexOptions flag. |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.