public void TestUInt16() { for (var n = 0; n < sizeof(UInt16) * 8; n++) { UInt16 a = (UInt16)(1 << n); UInt16 i = unchecked ((UInt16)0); i.SetBit1(n); Assert.Equal(a, i); } }