private void SetOptionFlag(bool modified, BitField field) { int value = modified ? 0 : 1; int optionFlags = GetInt(OFFSET_OPTION_FLAGS); optionFlags = field.SetValue(optionFlags, value); SetInt(OFFSET_OPTION_FLAGS, optionFlags); }
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)); }