public void TestUInt16() { for (var n = 0; n < sizeof(UInt16) * 8; n++) { UInt16 i = unchecked ((UInt16)((Int32)1 << n)); Assert.True(i.IsBitSet(n), n.ToString()); } }