Mono Class Library: System.Version Overview | Members

System.Version Constructor

Constructs and initializes a new instance of the Version class with the specified major, minor, build, and revision numbers. [Edit]

public Version (int major, int minor, int build, int revision)

Parameters

major
A int specifying the major component. [Edit]
minor
A int specifying the minor component. [Edit]
build
A int specifying the build component. [Edit]
revision
A int specifying the revision component. [Edit]
major
Documentation for this section has not yet been entered. [Edit]
minor
Documentation for this section has not yet been entered. [Edit]
build
Documentation for this section has not yet been entered. [Edit]
revision
Documentation for this section has not yet been entered. [Edit]

Exceptions

TypeReason
ArgumentOutOfRangeExceptionmajor, minor, build, or revision is less than zero. [Edit]

Remarks

Documentation for this section has not yet been entered. [Edit]

Example

The following example sets the version to "6.1.2.4" and writes the result to the console.

C# Example
using System;

public class Vers {
  public static void Main() {

    Version vers = new Version( 6, 1, 2, 4 );
    Console.WriteLine( "Version is {0}", vers.ToString() );
  }
}
   

The output is

Version is 6.1.2.4

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0