private bool GetOptionFlag(BitField field) { int optionFlags = GetInt(OFFSET_OPTION_FLAGS); int value = field.GetValue(optionFlags); return value == 0 ? true : false; }
public void TestSetLargeValues() { BitField bf1 = new BitField(0xF), bf2 = new BitField(0xF0000000); int a = 0; a = bf1.SetValue(a, 9); a = bf2.SetValue(a, 9); Assert.AreEqual(9, bf1.GetValue(a)); Assert.AreEqual(9, bf2.GetValue(a)); }