>= Operator (C# Reference)

 

Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

All numeric and enumeration types define a "greater than or equal" relational operator, >= that returns true if the first operand is greater than or equal to the second, false otherwise.

User-defined types can overload the >= operator. For more information, see operator. If >= is overloaded, <= must also be overloaded. Operations on integral types are generally allowed on enumeration.

    class GTE
    {
        static void Main()
        {
            Console.WriteLine(1.1 >= 1);
            Console.WriteLine(1.1 >= 1.1);
        }
    }
    /*
    Output:
    True
    True
    */

C# Reference
C# Programming Guide
C# Operators

Show: