Bothness

Apparently numbers can be both odd and even…

If IsNumeric(StreetNumberValue) Then
  If 2 Mod CType(StreetNumberValue, Integer) = 0 Then
    OddEven = "E" 'Even
  Else
    OddEven = "O" 'Odd
  End If
Else
  OddEven = "B" 'Both
End If

As seen here:
http://worsethanfailure.com/Articles/Odd-or-Even-or-Both.aspx

Advertisements

2 Responses

  1. There is that, and the fact that mod is used so that 1 and 2 will be the only 2 even numbers, and all the rest will be odd…

  2. hey, that’s VB!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: