Version class Overview

Represents a version number. This class cannot be extended. Sealed Class

Constructor

     

Name

Description

img_method

Version()

Initializes a new instance of the Version class.

img_method

Version(ver_str)

Initializes a new instance of the Version class using the specified string to be parsed

img_method

Version(ver_dict)

Initializes a new instance of the Version class using the specified dict to be parsed. Useful for loading json

img_method

Version(version)

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

img_method

Version(major, minor)

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

img_method

Version(major, minor, build)

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

img_method

Version(major, minor, build, revision)

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

Properties

     

Name

Description

img_prop

major

Gets the value of the major component of the version number for the current Version object.

img_prop

minor

Gets the value of the minor component of the version number for the current Version object.

img_prop

build

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

img_prop

revision

Gets the value of the revision component of the version number for the current Version object.

img_prop

major_revision

Gets the high 16 bits of the revision number.

img_prop

minor_revision

Gets the low 16 bits of the revision number.

img_prop

elements

Gets the number of version elements of the current instance.

Methods

           

Name

Description

img_method img_static

parse(input)

Converts the string representation of a version number to an equivalent Version object. Raises errors if input has issues.

img_method img_static

try_parse(input)

Converts the string representation of a version number to an equivalent Version object. Does not raise errors.

img_method

to_str()

Converts the value of the current Version object to its equivalent String representation.

img_method

to_str(field_count)

Converts the value of the current Version object to its equivalent String representation. A specified count indicates the number of elements to return.

img_method

to_tuple()

Converts the value of the current Version object to its equivalent tuple representation.

img_method

to_tuple(field_count)

Converts the value of the current Version object to its equivalent tuple representation. A specified count indicates the number of elements to return.