I'm new to mono and monomac, and I'm stuck with something that I hope is very easy to fix.
In my application, I want to change some images at runtime, so I created the Images folder with my photos inside the project root. But when I try to change the image in my code, the image cannot be found, so I think I'm writing the wrong path.
I am trying to get the image as follows:
NSImage image = new NSImage("Images/image2.jpg");
pic1.Image = image;
If I use the full path to the image, everything works fine, but I need to use relative. How should I get the correct relative path?
I am using Monodevelop.
Thank.
source
share