Even numbers are those numbers which are divided by 2 and they have not any reminder. Like 2, 4, 6, 8.
By the help of following function you can easily find out whether the input number is even or not.
[Vb.Net]
Private Function CheckEvenNumber(ByVal Number As Integer) As Boolean If Number Mod 2 = 0 Then CheckEvenNumber = True Else CheckEvenNumber = False End If End Function
[C#]
private bool CheckEvenNumber(int Number) { bool functionReturnValue = false; if (Number % 2 == 0) { functionReturnValue = true; } else { functionReturnValue = false; } return functionReturnValue; }