mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
core telemetry initial commit
This commit is contained in:
parent
96946d6323
commit
e0663bdbfd
1 changed files with 36 additions and 0 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue