summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Version.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/Version.cs')
-rw-r--r--src/StardewModdingAPI/Version.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/Version.cs b/src/StardewModdingAPI/Version.cs
index 3eacb2ae..bdecc8e0 100644
--- a/src/StardewModdingAPI/Version.cs
+++ b/src/StardewModdingAPI/Version.cs
@@ -98,6 +98,13 @@ namespace StardewModdingAPI
return string.Compare(this.ToString(), other.ToString(), StringComparison.InvariantCultureIgnoreCase);
}
+ /// <summary>Get whether this version is newer than the specified version.</summary>
+ /// <param name="other">The version to compare with this instance.</param>
+ public bool IsNewerThan(Version other)
+ {
+ return this.CompareTo(other) > 0;
+ }
+
/// <summary>Get a string representation of the version.</summary>
public override string ToString()
{