title: Shuffle random picture from resources on button click
body: <p>I have 1 picture box, named <code>studPic</code>. What I want to get is, when I click &quot;shuffle&quot; button, to get random image from resources.</p>
  <pre><code>private void button2_Click(object sender, EventArgs e)
          {
  ...     
          }
  </code></pre>
  <p>After research I've found following</p>
  <p><a href="http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/38d36fa4-1f5f-43e9-80f6-3c9a4edc7705/" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/38d36fa4-1f5f-43e9-80f6-3c9a4edc7705/</a></p>
  <p>I'm newbie to C#.. Is there easier way to achieve this result? For example, without adding picture names?</p>
  <h1>UPDATE</h1>
  <pre><code>List&lt;string&gt; pictureNames = new List&lt;string&gt;();
  pictureNames.Add(&quot;1&quot;);
  pictureNames.Add(&quot;2&quot;);
  pictureNames.Add(&quot;3&quot;);
  int randomPictureIndex = new Random().Next(0, pictureNames.Count);
  string randomPictureName = pictureNames[randomPictureIndex];
  pictureNames.Remove(randomPictureName);
  Image img = Properties.Resources.randomPictureName; //erroor
  studPic.Image = img;
  </code></pre>
  <p>getting error message
  Error   1   'Properties.Resources' does not contain a definition for 'randomPictureName'</p>