Tag archive for ‘programming’
C# Literal Types
When you are specifying literal numeric values in your code you will, on occasion, have to give the compiler a heads-up on the expected type from the declaration.
For example, the literal value 5.3 will, by default, be assumed to be a double. As such, the following
1
float result = 5.3 / 12.4;
will result in the [...]