Converts the string representation of a version number to an equivalent Version object.
Assembly: mscorlib (in mscorlib.dll)
input is a null reference (Nothing in Visual Basic).
input has fewer than two or more than four version components.
At least one component in input is less than zero.
At least one component in input is not an integer.
At least one component in input represents a number that is greater than Int32.MaxValue.
The input parameter must have the following format:
where major, minor, build, and revision are the string representations of the version number's four components: major version number, minor version number, build number, and revision number. Optional components are shown in square brackets ([ and ]). The components must appear in the specified order, and must be separated by periods.
Because the string representation of a version number must conform to a recognized pattern, applications should always use exception handling when calling the method to parse user input. Alternatively, you can call the TryParse method to parse the string representation of a version number and return a value that indicates whether the parse operation succeeded.
The method is a convenience method; it is equivalent to calling the Version(String) constructor.
.NET FrameworkSupported in: 4.5, 4
.NET Framework Client ProfileSupported in: 4
Portable Class LibrarySupported in: Portable Class Library
.NET for Windows Store appsSupported in: Windows 8
.NET for Windows Phone appsSupported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)