A bit manipulation readability enhancement library.
Counts the bits that are set to 1 in a number.
public static int PopCount(this uint number);
number
System.UInt32
The number to evaluate.
System.Int32 The count of the bits set to 1.
var v = uint.MaxValue;
Console.WriteLine($"{v.PopCount()} bits are set."); // outputs: 32 bits are set.
This is an alias for CountBitsSet(this uint).