Single.MinValue Field


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Represents the smallest possible value of Single. This field is constant.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

public const float MinValue

Field Value

Type: System.Single

The value of this constant is negative 3.402823e38.

The result of an operation that is less than Single.MinValue is Single.NegativeInfinity. In the following example, Single.NegativeInfinity results from subtraction and multiplication operations when the result is less than Single.MinValue.

using System;

public class Example
   public static void Main()
      float result1 = -8.997e37f + -2.985e38f;       
      Console.WriteLine("{0} (Negative Infinity: {1})", 
                        result1, Single.IsNegativeInfinity(result1));

      float result2 = -1.5935e25f * 7.948e32f;
      Console.WriteLine("{0} (Negative Infinity: {1})", 
                        result2, Single.IsNegativeInfinity(result2));
// The example displays the following output:
//    -Infinity (Negative Infinity: True)
//    -Infinity (Negative Infinity: True)

The following code example demonstrates the MinValue constant.

if (s < Single.MinValue)
    Console.WriteLine("Your number is smaller than a Single.");

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top