Since, you have selected only C# tag, I assume, its windows application.
There are two options now.
1. You can use CheckedListBox control (if you are in design phase) and there you can select property so it allows only one check box selection
2. You need to write code on form load
ChkBox1.CheckedChanged += new EventHandler(OnCheckedChanged);
ChkBox2.CheckedChanged += new EventHandler(OnCheckedChanged);
Now all check box will point to same event handler function.
In this even handler, you write
private void OnCheckedChanged(object sender, EventArgs e)
{
CheckBox clickedCheckBox = (CheckBox) sender;
if(clickedCheckBox.Checked)
{
if(clickedCheckBox.Name = "ChkBox1";
ChkBox2.Checked = false;
else
ChkBox1.Checked = false;
}
}
The only problem with second solution, it is going to be nightmare if you have more than 2-3 checkboxes.
Hope that helps. If it does, mark it as solution.
Thanks
Milind