Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to load an image file from the program data folder, like this:
Uri uriImage = new Uri(@"C:\ProgramData\Autodesk\ApplicationPlugins\\MyIcon32x32.png");
But on different computers, the folder may be on the "D:\" drive, or any other drive letter.
How do I rewrite this line so it works on any computer?
Since my .dll file should be in the same folder, I tried using @".\MyIcon32x32.png". I also tried just "MyIcon32x32.png", but neither worked.
Solved! Go to Solution.