CSharp examples for System:Math Number
Determines whether the specified value is an odd number.
using System.Text.RegularExpressions; using System.Security.Cryptography; using System.Globalization; using System;/*from w w w . ja va2s. c o m*/ public class Main{ /// <summary> /// Determines whether the specified value is an odd number. /// </summary> /// <param name="value">The value.</param> /// <returns> /// <c>true</c> if the specified value is odd; otherwise, <c>false</c>. /// </returns> public static bool IsOdd(this int value) { return ((value & 1) == 1); } }