how can i make check if an int isnt equal to a number? i did it like this but it doesnt work.
if(int /= 3)
{
//command
}
can anyone help?
CodePudding user response:
Generally in C# it looks like this:
int x = 5;
if (x != 3)
{
//do come work
}
CodePudding user response:
An int is Always a number. Do you mean to check it an Integer is a specific number?
CodePudding user response:
You are looking for the C# inequality operator.
int i = 5;
if (i != 3)
{
...
}