From e0663bdbfd7075e34678802bb966fc5bec2a114f Mon Sep 17 00:00:00 2001 From: Jack Kanarish Date: Sun, 5 Apr 2020 11:05:42 -0400 Subject: [PATCH] core telemetry initial commit --- ICD.Common.Utils/StringUtils.cs | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/ICD.Common.Utils/StringUtils.cs b/ICD.Common.Utils/StringUtils.cs index 2569b14..b838fa4 100644 --- a/ICD.Common.Utils/StringUtils.cs +++ b/ICD.Common.Utils/StringUtils.cs @@ -268,6 +268,42 @@ namespace ICD.Common.Utils return TryConvert(Convert.ToSingle, value, out result); } + /// + /// Attempts to parse the string as a double. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out double result) + { + return TryConvert(Convert.ToDouble, value, out result); + } + + /// + /// Attempts to parse the string as a byte. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out byte result) + { + return TryConvert(Convert.ToByte, value, out result); + } + + /// + /// Attempts to parse the string as a float. + /// + /// + /// + /// + [PublicAPI] + public static bool TryParse(string value, out char result) + { + return TryConvert(Convert.ToChar, value, out result); + } + /// /// Attempts to parse the string as a bool. ///