What is Double.Epsilon in C#?
Overview
Double.Epsilon is a field in C# that represents the smallest positive double value that is greater than zero. It is a constant field, which means it does not change, and cannot be changed.
Syntax
public const double Epsilon = 4.94065645841247E-324;
Parameters
This field has no parameters.
Return value
This field, when called, returns a double with the value 4.94065645841247E-324.
Code example
// use the Systemusing System;// create a classclass DoubleEpsilon{// the main methodstatic void Main(){// print the value of the Double.Epsilon fieldSystem.Console.WriteLine(Double.Epsilon);}}
Explanation
- Line 10: The value of
Double.Epsilonfield is printed to the console.