System.Numerics.BitOperations static class BitOperations Documentation Code public static int LeadingZeroCount(ulong value)