C# Double LessThanOrEqual
Description
Double LessThanOrEqual
returns a value that indicates
whether a specified Double value is less than or equal to another specified
Double value.
Syntax
Double.LessThanOrEqual
has the following syntax.
public static bool operator <=(
double left,
double right
)
Parameters
Double.LessThanOrEqual
has the following parameters.
left
- The first value to compare.right
- The second value to compare.
Returns
Double.LessThanOrEqual
method returns true if left is less than or equal to right; otherwise, false.
Example
The following code shows how to use Double.LessThanOrEqual
operator.
public class MainClass{
public static void Main(){
double d1 = 1.2;
double d2 = 1.3;
//from w ww .ja v a 2s . c o m
System.Console.WriteLine(d1 <= d2);
}
}
The code above generates the following result.