private int returnValue() { int result = -1; if (r1.Checked) { result = comboBox1.SelectedIndex; } if (r2.Checked) { result = pcc.FindNameOrAdd(textBox1.Text); } return(result); }