Thursday, December 8, 2011

Check if number is odd/even in C#

int iNum = 8;
if(Num % 2 == 0)
 {
     // It's even
 }
else
 {
      // It's odd
 }

No comments:

Post a Comment

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...