Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / C#

>: practical reference

>: practical reference: > tests whether the left operand is strictly greater.

Version: C# language; verified against C# 14 reference

Syntax

left > right

tests whether the left operand is strictly greater.

Use it for an exclusive bound with an explicit type and unit.

string does not use >; it needs a comparer with the intended culture or ordinal rules.

A comparison with NaN is false, and overflow in an earlier calculation can change the outcome.

The complete program actually uses >; its exact expected stdout is True.

Examples

using System;
using System.Linq;
using System.Threading.Tasks;

Console.WriteLine(5 > 4);

Result

True

The complete program actually uses `>`; its exact expected stdout is `True`.

Sources