C# Single LessThan
Description
Single LessThan
returns a value that indicates whether
a specified Single value is less than another specified Single value.
Syntax
Single.LessThan
has the following syntax.
public static bool operator <(
float left,
float right
)
Parameters
Single.LessThan
has the following parameters.
left
- The first value to compare.right
- The second value to compare.
Returns
Single.LessThan
method returns true if left is less than right; otherwise, false.
Example
The LessThan method defines the operation of the less-than operator for Single values.
using System;/*from w ww.j a v a 2s. com*/
public class MainClass{
public static void Main(String[] argv){
float f1 = 1.2F;
float f2 = 1.2F;
Console.WriteLine(f1 < f2);
}
}
The code above generates the following result.