Your profile says you're based in Brazil and in Brazil "two and a half" is "2,5", not "2.5".
If you run your code with "2,00" it should work.
Here's an example with different cultures:
foreach(var two in new []{"2.00", "2,00"})
foreach(var culture in new []{"pt-BR", "en-AU"})
{
bool ok = int.TryParse(two, System.Globalization.NumberStyles.Float, new System.Globalization.CultureInfo(culture), out var i);
Console.WriteLine($"For '{culture}' '{two}' is {(ok ? "OK" : "not OK")}");
}
This prints:
For 'pt-BR' '2.00' is not OK
For 'en-AU' '2.00' is OK
For 'pt-BR' '2,00' is OK
For 'en-AU' '2,00' is not OK