Nucleus .Net Core CMS

VersionExtensions Class

Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
Extensions for the System.Version class.

Methods

IsLessThan (Version,String) Method

IsLessThan (Version version, String compareToVersion)
Returns a valid indicating whether the specified string represents a version which is less than this version.
Parameters
Name Type
version Version
compareToVersion String
Remarks
compareToVersion should contain a string in the form of a version, but can contain a '*' in place of any of the version fields.

IsGreaterThan (Version,String) Method

IsGreaterThan (Version version, String compareToVersion)
Returns a valid indicating whether the specified string represents a version which is greater than this version.
Parameters
Name Type
version Version
compareToVersion String
Remarks
compareToVersion should contain a string in the form of a version, but can contain a '*' in place of any of the version fields.

ZeroUndefinedElements (Version) Method

ZeroUndefinedElements (Version version)
Replace version elements which have been set to -1 with zero, so that comparisons work properly
Parameters
Name Type
version Version