This might be even better. After all, it's the way I do it in my head. :laugh:
bool IsNumberEven(int number) {
string sNumber = number.ToString();
string sLastDigit = sNumber[sNumber.Length - 1];
if(sLastDigit == '0' || sLastDigit == '2' || sLastDigit == '4' || sLastDigit == '6' || sLastDigit == '8' ) {
return true;
}
else {
return false;
}
}