Is there any advantage to using int instead of float when the number you want to keep is not a decimal number?
eg.
int number = 10; float number = 10;
Why do I want to use int instead of float here?
Yes, there are many advantages.
int
for one, because int math is faster. Better to ask why you want to use type A to represent what you know, type B?
In general, you should use a type that matches what you are trying to represent
Source: https://habr.com/ru/post/1441901/More articles:C # .net winforms DataGridView footer - c #HTML attribute with / without quotes - htmlRapid device testing << in C ++ - c ++How to WebBrowser.Navigate () from BackgroundWorker? - c #Building a custom expression tree in Spirit: Qi (without Utree or Boost :: Variant) - c ++How to add qi :: characters in the grammar? - c ++EF orderby / then combined extension method - c #iframe height attribute does not work with Firefox - htmlMySQL query - joining two tables with duplicate results - sqlImplicit typing in a ListItemCollection is not possible using foreach, but it is possible with a for loop - c #All Articles