3 ms·
If you write in C# decimal a = 0.1m; decimal b = 0.2m; var result = a + b; then you will get exactly 0.3, because decimal is a special high-precision numeric ty
by covidcovidcovid 6y ago
If you write in C# decimal a = 0.1m; decimal b = 0.2m; var result = a + b; then you will get exactly 0.3, because decimal is a special high-precision numeric type that doesn't have such issues.