title: Checking multiple Radio buttons from different group boxes in c#
body: <p>I am a newbie in C# I just have a doubt.I have two group boxes,each of them has three radio buttons in it,If I want to select each radio button from each groupbox and write a condition for that ,,How can I do that. Below is the code:</p>
  
  <pre><code>   public void SaveMyTextBoxContents()
          {
  
              string path = usbLetter +"MSREAD.txt";
  
              if (lbItems.SelectedIndex == -1)
  
              {
  
                          if (rdBtnMed.Checked)
                          {
                              using (StreamWriter File = new StreamWriter(filepath))
                              {
                                  foreach (string item in lbItems.Items)
                                  {
                                      saveAllText = medium + " " + item;
                                      outputFile.WriteLine(saveText);
                                  }
                              }
                          }                        
  }
                          else if (rdBtnMedium.Checked &amp;&amp; rdBtnN.Checked)
                          {
                              using (StreamWriter File = new StreamWriter(filepath))
                              {
                                  foreach (string item in lbItems.Items)
                                  {
                                      saveAllText = mediumNo + " " + item;
                                      outputFile.WriteLine(saveText);
                                  }
                              }
                          }
  
  
  
  }
  }  
  </code></pre>
  
  <p>Please help me I got stuck up with this.</p>
  
  <p>Thanks Krik</p>