Determine if a number is odd or even using system.math

Is there a way to determine if a number is odd or even using the System.Math function?

HepenAsked:
Who is Participating?
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
You can use the Mod function to determine if a number is even like this:

    Private Function isEven(ByVal number As Integer) As Boolean
        Return (number Mod 2) = 0
    End Function

~IM
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.