Initializes a new instance of the ProtocolVersion with a version number extracted from the supplied parameter.
[Visual Basic] Overloads Public Sub New( _ ByVal versionString As String _ ) [C#] public ProtocolVersion( string versionString ); [C++] public: ProtocolVersion( String* versionString ); [JScript] public function ProtocolVersion( versionString : String );
Exception Type | Condition |
---|---|
ArgumentException | versionString does not contain a version number
-or- The Major or Minor version numbers are less than 0. |
OverflowException | The Major or Minor version numbers in versionString will not are greater than the maximum allowed in a 32-bit signed integer. |
The constructor will search the contents of versionString seaching for the first occurance of a version number. If passed "HTTP/1.1" a ProtocolVersion instance is created with Major =1 and Minor =1.
ProtocolVersion Class | ProtocolVersion Members | System.Net Namespace | ProtocolVersion Constructor Overload List