using System;
public static class Program
{
public static void Main()
var a = "123.0";
var b = "123.1";
Console.WriteLine(a.IsDecimal());
Console.WriteLine(b.IsDecimal());
}
static bool IsDecimal(this string s) => decimal.TryParse(s, out var result) && Convert.ToInt32(result) == result;