title: C# Visual Studio using resource files
body: <p>I'm trying to add two image files into the solution, so they will be compiled into the .exe, so I can load them right there instead of from an absolute path on the computer.</p>
  
  <p>I believe I need to use resource files in Visual Studio, but I never have before. If I'm completely on the wrong track, please correct me.</p>
  
  <p>Here's what I've done so far. In Visual Studio 2010 Solution Explorer, right click <em>Properties</em> → <em>Open</em> → <em>Resources</em> → <em>Add Resource</em> → <em>Add Existing File</em>...</p>
  
  <p>So now I have both my images in the <em>Properties</em> → <em>Resources</em> tab. Now how do I get them back out in the C# code?</p>
  
  <p>I'm using C#, <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="nofollow noreferrer">Windows Forms</a> and <a href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2010" rel="nofollow noreferrer">Visual Studio 2010</a>.</p>
  
  <pre><code>PictureBox pic;
  pic.Image = new Bitmap( /* What is the address now? */ );
  </code></pre>