Constructor()

Namespace ›› System ›› MfVersion ›› Methods ››
Parent Previous Next

Constructor()

Creates a new instance of MfVersion Class

OutputVar := new MfVersion()
OutputVar := new MfVersion(version)
OutputVar := new MfVersion(major, minor)
OutputVar := new MfVersion(major, minor, build)
OutputVar := new MfVersion(major, minor, build, revision)

Constructor()

Initializes a new instance of the MfVersion class.

Constructor(version)

Initializes a new instance of the MfVersion class using the specified version.

Parameters

version

A string containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.').

Remarks

The version parameter can contain only the components major, minor, build, and revision, in that order, and all separated by periods. There must be at least two components, and at most four. The first two components are assumed to be major and minor. The value of unspecified components is undefined.

The format of the version number is as follows. Optional components are shown in square brackets ('[' and ']'):

major.minor[.build[.revision]]

All defined components must be integers greater than or equal to 0. For example, if the major number is 3, the minor number is 4, the build number is 2, and the revision number is 5, then version should be "3.4.2.5".

Throws

Throws MfArgumentException version has fewer than two components or more than four components.
Throws MfArgumentNullException version is null.
Throws MfArgumentOutOfRangeException A major, minor, build, or revision component is less than zero.
Throws MfFormatException At least one component of version does not parse to an integer.
Throws MfOverflowException At least one component of version represents a number greater than MfInteger.MaxValue.

Constructor(major, minor)

Initializes a new instance of the MfVersion class using the specified major and minor values.

Parameters

major

The major version number.
Can be var integer any type that matches IsInteger.

minor

The minor version number.
Can be var integer any type that matches IsInteger.

Throws

Throws MfArgumentOutOfRangeException A major or minor is less than zero.

Constructor(major, minor, build)

Initializes a new instance of the MfVersion class using the specified major, minor, and build values.

Parameters

major

The major version number.
Can be var integer any type that matches IsInteger.

minor

The minor version number.
Can be var integer any type that matches IsInteger.

build

The build number.
Can be var integer any type that matches IsInteger.

Throws

Throws MfArgumentOutOfRangeException A major, minor or build is less than zero.

Constructor(major, minor, build, revision)

Initializes a new instance of the MfVersion class with the specified major, minor, build, and revision numbers.

Parameters

major

The major version number.
Can be var integer any type that matches IsInteger.

minor

The minor version number.
Can be var integer any type that matches IsInteger.

build

The build number.
Can be var integer any type that matches IsInteger.

revision

The revision number.
Can be var integer any type that matches IsInteger.

Throws

Throws MfArgumentOutOfRangeException A major, minor, build or revision is less than zero.