Пример #1
0
 public static void Test_BitAt()
 {
     for (int i = 0; i < LOOP_COUNT; i++)
     {
         Debug.Assert(TEST_VALUE.BitAt(i) == EXPTECTED_BITS[i]);
     }
 }
Пример #2
0
        public static string BitString(this uint value)
        {
#pragma warning disable XS0001 // Find APIs marked as TODO in Mono
            var stringBuilder = new System.Text.StringBuilder(32);
#pragma warning restore XS0001 // Find APIs marked as TODO in Mono

            for (int i = 31; i >= 0; i--)
            {
                stringBuilder.Append(value.BitAt(i));
            }

            return(stringBuilder.ToString());
        }