mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 05:05:05 +00:00
core telemetry initial commit
This commit is contained in:
committed by
Chris Cameron
parent
96946d6323
commit
e0663bdbfd
@@ -268,6 +268,42 @@ namespace ICD.Common.Utils
|
|||||||
return TryConvert(Convert.ToSingle, value, out result);
|
return TryConvert(Convert.ToSingle, value, out result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attempts to parse the string as a double.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <param name="result"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[PublicAPI]
|
||||||
|
public static bool TryParse(string value, out double result)
|
||||||
|
{
|
||||||
|
return TryConvert(Convert.ToDouble, value, out result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attempts to parse the string as a byte.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <param name="result"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[PublicAPI]
|
||||||
|
public static bool TryParse(string value, out byte result)
|
||||||
|
{
|
||||||
|
return TryConvert(Convert.ToByte, value, out result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attempts to parse the string as a float.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="value"></param>
|
||||||
|
/// <param name="result"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[PublicAPI]
|
||||||
|
public static bool TryParse(string value, out char result)
|
||||||
|
{
|
||||||
|
return TryConvert(Convert.ToChar, value, out result);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attempts to parse the string as a bool.
|
/// Attempts to parse the string as a bool.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user