exception

E

Erwin Zwart

As i am i dummy user trying to debug a dummy application i've got a
exception thrown at a very basic piece of code:

public static Image LoadImage( string Filename )
{
try
{
Image img = new Bitmap( Filename );
return img;
}
catch { }

return null;
}

"A first chance exception of type 'System.InvalidCastException' occurred in
System.Drawing.dll" is thrown at
Image = img new Bitmap( Filename) where filename is a string which indicates
the picturename and path. thi

Seems good code to me,
I also tried it with a bitmap and also tried to cast it to an Image object,
but same exception.

I am targeting a I-mate Windows Mobile5 device,

Is this normal behaviour?!?


Many thanks in advance,

Eddy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top