Skip to content

equal to

The equal to keyword is used in conjunction with is and isnt keywords to form a conditional statement.
This is the replacement for the == and !=. Alternatively, omitting the equal to keyword is also grammatically correct.

Syntax

myVariable is equal to myVariable2
myVariable isnt equal to myVariable2
myVariable is myVariable2
myVariable isnt myVariable2

Example Code

if (myVariable is equal to myVariable2)
{
}
if (myVariable isnt equal to myVariable2)
{
}
if (myVariable is myVariable2)
{
}
if (myVariable isnt myVariable2)
{
}