System.Xml.Bits.ExactlyOne C# (CSharp) Method

ExactlyOne() public static method

Returns true if the unsigned integer has exactly one bit set.
public static ExactlyOne ( uint num ) : bool
num uint
return bool
        public static bool ExactlyOne(uint num) {
            return num != 0 && (num & (num - 1)) == 0;
        }