summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/StardewModdingAPI/ISemanticVersion.cs3
-rw-r--r--src/StardewModdingAPI/Version.cs5
2 files changed, 8 insertions, 0 deletions
diff --git a/src/StardewModdingAPI/ISemanticVersion.cs b/src/StardewModdingAPI/ISemanticVersion.cs
index f50752fe..3b9bdb44 100644
--- a/src/StardewModdingAPI/ISemanticVersion.cs
+++ b/src/StardewModdingAPI/ISemanticVersion.cs
@@ -31,5 +31,8 @@ namespace StardewModdingAPI
/// <summary>Get whether this version is newer than the specified version.</summary>
/// <param name="other">The version to compare with this instance.</param>
bool IsNewerThan(ISemanticVersion other);
+
+ /// <summary>Get a string representation of the version.</summary>
+ string ToString();
}
} \ No newline at end of file
diff --git a/src/StardewModdingAPI/Version.cs b/src/StardewModdingAPI/Version.cs
index 9c13381a..87cd4f3d 100644
--- a/src/StardewModdingAPI/Version.cs
+++ b/src/StardewModdingAPI/Version.cs
@@ -85,6 +85,11 @@ namespace StardewModdingAPI
return this.GetSemanticVersion().IsNewerThan(other);
}
+ /// <summary>Get a string representation of the version.</summary>
+ public override string ToString()
+ {
+ return this.GetSemanticVersion().ToString();
+ }
/*********
** Private methods