bool GetValue(int index) { if (index == 0) { // None can't be selected return(false); } else { // We need to remove 1 to the index because there is the None element on top of // the enum and it doesn't count in the bit field because it's value is 0 index--; int intValue = System.Convert.ToInt32(m_Field.GetValue()); return((intValue & (1 << index)) != 0); } }
bool GetValue(int index) { int intValue = System.Convert.ToInt32(m_Field.GetValue()); return((intValue & (1 << index)) != 0); }