summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/SemanticVersion.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/StardewModdingAPI/SemanticVersion.cs')
-rw-r--r--src/StardewModdingAPI/SemanticVersion.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/SemanticVersion.cs b/src/StardewModdingAPI/SemanticVersion.cs
index 4b27c819..f30c43cd 100644
--- a/src/StardewModdingAPI/SemanticVersion.cs
+++ b/src/StardewModdingAPI/SemanticVersion.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Text.RegularExpressions;
namespace StardewModdingAPI
@@ -178,6 +178,16 @@ namespace StardewModdingAPI
return this.IsBetween(new SemanticVersion(min), new SemanticVersion(max));
}
+#if !SMAPI_1_x
+ /// <summary>Indicates whether the current object is equal to another object of the same type.</summary>
+ /// <returns>true if the current object is equal to the <paramref name="other" /> parameter; otherwise, false.</returns>
+ /// <param name="other">An object to compare with this object.</param>
+ public bool Equals(ISemanticVersion other)
+ {
+ return other != null && this.CompareTo(other) == 0;
+ }
+#endif
+
/// <summary>Get a string representation of the version.</summary>
public override string ToString()
{