Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does system.float not exist in .net?

Tags:

.net

types

c#-4.0

Why does .Net not have the System.Float type like System.String, System.Double etc.?

like image 360
Abhishek Shukla Avatar asked Jun 27 '12 10:06

Abhishek Shukla


2 Answers

It has type System.Single, which is what you are looking for.

See table for built-in value types in C# at MSDN.

There is a slight discrepancy between how types are called in C# (where name-type are similar to C-languages, but not the same (for example - long type)) and in .Net Framework, which should be language independent of course, as many languages can (and do) run on it.

like image 56
Marcin Deptuła Avatar answered Oct 15 '22 07:10

Marcin Deptuła


Because it is an alias of System.Single

Have a look at http://msdn.microsoft.com/en-us/library/b1e65aza.aspx

like image 32
ksg91 Avatar answered Oct 15 '22 07:10

ksg91