CSharp - What is the output: float type literal?


What is the output of the following code?

using System;
class MainClass
   public static void Main(string[] args)
       float f = 4.5;


Click to view the answer

float f = 4.5;//compile time error


Without the F suffix, the following line would not compile, because 4.5 would be inferred to be of type double, which has no implicit conversion to float:

float f = 4.5F;