What is the output of the following code?
using System; class MainClass { public static void Main(string[] args) { float f = 4.5; Console.WriteLine(f); } }
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;