System.Xml.Bits.ExactlyOne C# (CSharp) Méthode

ExactlyOne() public static méthode

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