1
0
mirror of synced 2024-12-18 04:45:55 +01:00
TaikoSoundEditor/Utils/Number.cs

36 lines
814 B
C#
Raw Normal View History

2023-07-19 07:10:25 +02:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TaikoSoundEditor.Utils
{
internal static class Number
{
public static int ParseInt(string value)
{
try
{
return int.Parse(value);
}
catch(FormatException ex)
{
throw new FormatException($"{ex.Message} : {value} to int", ex);
}
}
public static float ParseFloat(string value)
{
try
{
return float.Parse(value);
}
catch (FormatException ex)
{
throw new FormatException($"{ex.Message} : {value} to float", ex);
}
}
}
}