title: How can I convert a string to an ImageFormat class property?
body: <p>Currently I have this:</p>
  
  <pre><code>printscreen.Save(myOutputLocation + myImageName + myImageExtension, ImageFormat.Png);
  </code></pre>
  
  <p>However, I would like to specify the ImageFormat class property with a string, but I can't get it to work:</p>
  
  <pre><code>string myString = textBox1.Text;
  printscreen.Save(myOutputLocation + myImageName + myImageExtension, ImageFormat.myString);
  </code></pre>