Код: Выделить всё
public void divide(string args)
{
if (args.Contains("/"))
{
var a = args.Split('/')[0];
var b = args.Split('/')[1];
if (a is float && b is float)
{
Console.WriteLine(a / b);
}
else
{
Console.WriteLine("Error, input isnt float");
}
}
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... in-c-sharp
Мобильная версия