title: C# need to dynamically create radio buttons and determine which value user selected in Winform
body: <p>I need to dynamically create radio buttons based on dynamic list. Scenario is like I have list of files shown as Radio button in WinForm. A user clicks on radio button to select file and move forward.
  I tried doing following as an example</p>
  
  <pre><code>for (int i = 0; i &lt; 10; i++)  
  {     
      ii = new RadioButton();  
      ii.Text = i.ToString();  
      ii.Location = new Point(20, tt);  
      tt = tt + 20;  
      panel1.Controls.Add(ii);                  
  }
  </code></pre>
  
  <p>The problem is how would I check which value got selected by user?</p>