News for hackers. Stuff that matters.
Re:What's new in the .NET 11 runtime by rednb on Wednesday November 11, 2026 @01:11AM (#50450216)
Fair enough, this is mostly what i do but since the runtime has been forgiving, i'll need to triple check that. I label all pure money fields as decimal, but am less confident for the ProductQuantity kind of fields. I typically use int for whole numbers but wouldn't be surprised if i used float occasionnally for quantities accepting decimals.
Re:What's new in the .NET 11 runtime by bazoom42 on Wednesday November 11, 2026 @03:44AM (#50451060)
In cases where you have to convert from float/double to decimal you should use an explicit rounding method, not just a raw cast.