using System.Globalization;
public static void Main()
string numero = "12,126456";
if (decimal.TryParse(numero,NumberStyles.AllowDecimalPoint, CultureInfo.CreateSpecificCulture("pt-BR"), out d))
Console.WriteLine(d.ToString("N2"));
Console.WriteLine("Número inválido");