Class FileVersion

Represents the file version of an assembly

Constructors

FileVersion()

Declaration
RequestResponse
new FileVersion()

Functions

parse(fileVersion)

Parses a file version string (format: <major>.<minor>.<patch>.<revision>) to an instance.

Declaration
RequestResponse
function parse(fileVersion)
Parameters
TypeNameDescription
fileVersion

The file version string to parse

Returns
TypeDescription

A file version instance.

tryParse(fileVersion, defaultValue)

Tries to parse a file version string (see parse(fileVersion)) and returns null or the specified default value when it fails.

Declaration
RequestResponse
function tryParse(fileVersion, defaultValue)
Parameters
TypeNameDescription
fileVersion

The file version string to parse

defaultValue

The value to return when parsing fails

Returns
TypeDescription

A file version instance or null.

smallerThan(otherVersion)

Compares if the current instance is smaller than the specified version.

Declaration
RequestResponse
function smallerThan(otherVersion)
Parameters
TypeNameDescription
otherVersion

The version to compare the current instance to

Returns
TypeDescription

A boolean with the result.

smallerThanOrEqual(otherVersion)

Compares if the current instance is smaller or equal than the specified version.

Declaration
RequestResponse
function smallerThanOrEqual(otherVersion)
Parameters
TypeNameDescription
otherVersion

The version to compare the current instance to

Returns
TypeDescription

A boolean with the result.

greaterThan(otherVersion)

Compares if the current instance is greater than the specified version.

Declaration
RequestResponse
function greaterThan(otherVersion)
Parameters
TypeNameDescription
otherVersion

The version to compare the current instance to

Returns
TypeDescription

A boolean with the result.

greaterThanOrEqual(otherVersion)

Compares if the current instance is greater or equal than the specified version.

Declaration
RequestResponse
function greaterThanOrEqual(otherVersion)
Parameters
TypeNameDescription
otherVersion

The version to compare the current instance to

Returns
TypeDescription

A boolean with the result.

equals(otherVersion)

Compares if the current instance equals (by values) the specified file.

Declaration
RequestResponse
function equals(otherVersion)
Parameters
TypeNameDescription
otherVersion

The version to compare the current instance to

Returns
TypeDescription

A boolean with the result.

compareTo(otherVersion)

Compare the current instance with the specified file.

Declaration
RequestResponse
function compareTo(otherVersion)
Parameters
TypeNameDescription
otherVersion

The version to compare the current instance to

Returns
TypeDescription

0 when the versions are equal,. 1 when the current instance is greater, -1 when the current instance is smaller

toString()

Gets the file version string representation for this instance.

Declaration
RequestResponse
function toString()

Do you have some feedback for us?

If you have suggestions for improving this article,