what the need of using single and float keywords separately . when we have to use single in the real time scenario?
The two keywords are interchangable.
float
is actually provided by the C# language, and is an alias for System.Single
. You can't use Single
by itself, as its not merely a keyword, but the System.Single
type. This requires a using System;
at the top of your file or fully qualifying it. float
, on the other hand, is a language provided keyword, and will work in any scenario, without bringing in the namespace.
This is also the case with int
/System.Int32
, double
/System.Double
, etc.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…