Home
Tech Services
$88 Tech Onsite Offer
Tech Assist
Tech Onsite
Tech Advice
Tech Remote
Tech Web
Professional Services
Contact Us
Currently Browsing: C# Tips
C#: How to determine if a number is odd or even.
Posted by
cnecorp
in
C# Tips
on Aug 12th, 2017
A popular way is to use the modulus operator:
if
(
variable
%
2
==
0
)
return true;
else
return false;
NB: Modulus is one of the slowest mathematical operators.
Knowledge Base
Azure Cloud Computing
C# Tips
Galaxy Note Phones
Networks
NinjaTrader
PC Matters
Security & Backups
Synology
WordPress