How to determine if only one of twelve checkboxes is checked? [closed]

Assuming WinForms you can query GroupBox (let it has name myGroupBox), panel on which all the CheckBox of interest are, with a help of Linq:

 using System.Linq;

 ...

 if (myGroupBox.Controls.OfType<CheckBox>().Count(box => box.Checked) == 1) {
   ...
 }