I'm currently loading images in different ways like this:
try {
// way 1
}
catch
{ // way 1 didn't work
try {
// way 2
}
catch
{
// etc.
}
}
I was wondering if there was a cleaner way to do this. Currently it's not a problem but if i add a few more ways it's going to get messy.
Note that the method loading the image is also in a try catch in the same way because it might not be an image.
It's basically trying a bunch of stuff to figure out what it is you dragged into the application.