Class Version
SDK Version.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Version : object
Constructors
Version()
Initializes a new instance of the Version class with default values.
Declaration
public Version()
Version(String)
Initializes a new instance of the Version class with the specified version string.
Declaration
public Version(string versionString)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | versionString | A string representation of the version in the format "major.minor.patch.revision". |
Properties
Major
Gets or sets the major version number.
Declaration
public int Major { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The major version number. |
Minor
Gets or sets the minor version number.
Declaration
public int Minor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The minor version number. |
Patch
Gets or sets the patch version number.
Declaration
public int Patch { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The patch version number. |
Revision
Gets or sets the revision version number.
Declaration
public int Revision { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The revision version number. |
Methods
IsEqualTo(Version)
Determines whether this version is equal to the specified version.
Declaration
public bool IsEqualTo(Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| Version | version | The version to compare with this version. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsNewerThan(Version)
Determines whether this version is newer than the specified version.
Declaration
public bool IsNewerThan(Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| Version | version | The version to compare with this version. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
A development version (0.0.0.0) is considered newer than all other versions except another development version.
IsNewerThanOrEqualTo(Version)
Determines whether this version is newer than or equal to the specified version.
Declaration
public bool IsNewerThanOrEqualTo(Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| Version | version | The version to compare with this version. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
IsOlderThan(Version)
Determines whether this version is older than the specified version.
Declaration
public bool IsOlderThan(Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| Version | version | The version to compare with this version. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Remarks
A development version (0.0.0.0) is not considered older than any other version.
IsOlderThanOrEqualTo(Version)
Determines whether this version is older than or equal to the specified version.
Declaration
public bool IsOlderThanOrEqualTo(Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| Version | version | The version to compare with this version. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Parse(String)
Converts the string representation of a version to its Version equivalent.
Declaration
public static Version Parse(string versionString)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | versionString | A string representation of the version to parse. |
Returns
| Type | Description |
|---|---|
| Version | A Version object equivalent to the version contained in |
Stringify()
Returns a string representation of this version.
Declaration
public string Stringify()
Returns
| Type | Description |
|---|---|
| System.String | A string representation of this version in the format "major.minor.patch.revision". |
ToString()
Returns a string representation of this version.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string representation of this version in the format "major.minor.patch.revision". |
TryParse(String, out Version)
Tries to convert the string representation of a version to its Version equivalent, and returns a value that indicates whether the conversion succeeded.
Declaration
public static bool TryParse(string versionString, out Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | versionString | A string representation of the version to parse. |
| Version | version | When this method returns, contains the Version equivalent of the version contained in |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|