title: Retrieving filename used to create Bitmap object (C#)
body: <p>Is there a method/property where you can obtain the filename used to create a bitmap object?</p>
  
  <p>For instance if a bitmap were created somewhere in my main code then passed to a method</p>
  
  <pre><code>Bitmap myImage = new Bitmap("C:\\Images\\myImage.bmp");
  MyMethod(myImage);
  </code></pre>
  
  <p>How would I get MyMethod to determine the name of the file used to create myImage</p>
  
  <pre><code>public void MyMethod(Bitmap myImage)
  {
       string imageFileName = // WHAT TO PUT HERE?
  }
  </code></pre>
  
  <p>Just to be clear the value of imageFileName in MyMethod should be "C:\\Images\\myImage.bmp".  I would like to avoid creating a global variable.<br>
  Thanks.</p>