summaryrefslogtreecommitdiff
path: root/src/TrainerMod/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-03-14 13:44:41 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-03-14 13:44:41 -0400
commit02a4c40814caf26f21fc9afd9c64afd639da462f (patch)
treeb3ac580e218650eeb72aa154824dd009d22dd3a4 /src/TrainerMod/Framework
parent8bd265fed60d32a6fe64f01b8528738274aa0083 (diff)
downloadSMAPI-02a4c40814caf26f21fc9afd9c64afd639da462f.tar.gz
SMAPI-02a4c40814caf26f21fc9afd9c64afd639da462f.tar.bz2
SMAPI-02a4c40814caf26f21fc9afd9c64afd639da462f.zip
simplify TrainerMod int parsing with C# 7 out variables
Diffstat (limited to 'src/TrainerMod/Framework')
-rw-r--r--src/TrainerMod/Framework/Extensions.cs25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/TrainerMod/Framework/Extensions.cs b/src/TrainerMod/Framework/Extensions.cs
deleted file mode 100644
index da3a2f03..00000000
--- a/src/TrainerMod/Framework/Extensions.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-namespace TrainerMod.Framework
-{
- /// <summary>Provides extension methods on primitive types.</summary>
- internal static class Extensions
- {
- /*********
- ** Public methods
- *********/
- /// <summary>Get whether an object is a number.</summary>
- /// <param name="value">The object value.</param>
- public static bool IsInt(this object value)
- {
- int i;
- return int.TryParse(value.ToString(), out i);
- }
-
- /// <summary>Parse an object into a number.</summary>
- /// <param name="value">The object value.</param>
- /// <exception cref="System.FormatException">The value is not a valid number.</exception>
- public static int ToInt(this object value)
- {
- return int.Parse(value.ToString());
- }
- }
-}