How to quickly determine is given number odd or even? There are several simple methods.
Here is the first one:
public bool IsEven(int i)
{
return (i & 1) == 0;
}
And the second:
public bool IsEven(int i)
{
return (i % 2) == 0;
}
3c0f8310-7e73-4f27-a932-55390dec60cc|0|.0