1

I want the following functionality in my code, so I can save files or images to assembly of my project from computer for later use:

SetHeaderImage(openFileDialog1.FileName);

private static void SetHeaderImage(string filePath)
{
    WindowsFormsApplication.Properties.Resources.add(filePath);
}

Actually I need this functionality to set the image for invoice header to which can I embed in my Project.exe file.

  • 4
    You can't modify the assembly on runtime, you should use a external file. You probably could use a different assembly and compile it adding an external file, but that's pointless. – Pau C Feb 15 '17 at 18:14
  • Fixed code snippets, Improved formatting – Tha'er AlAjlouni ثائر العجلوني Feb 18 '17 at 02:16
  • Your code implies that you want to do this at run-time after you have compiled and deployed your application. If you wanted to do this during development before you deploy your application then it is possible with an embedded resource. Report tools often work better with separate files. – Sql Surfer Feb 18 '17 at 03:08

0 Answers0