Languages
[Edit]
EN

C# / .NET - max float value

0 points
Created by:
Wade
562

In C#, max float number value can be achieved using float.MaxValue that is equal to 3.4028235E+38.

Quick solution:

float.MaxValue

 

Practical example

float value = float.MaxValue;

Console.WriteLine(value);

Output:

3.4028235E+38

To see the whole number use the following solution:

Console.WriteLine(float.MaxValue.ToString("#"));

Output:

340282300000000000000000000000000000000

References

  1. Single.MaxValue Field (System) | Microsoft Docs

See also

  1. C# / .NET - min float value

  2. C# / .NET - min double value

  3. C# / .NET - max double value

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join