I'm getting a System.ObjectDisposedException error when trying to reference
the fs.Length property in this piece of code:

using (Android.Graphics.Bitmap bitmap =
Android.Graphics.BitmapFactory.DecodeByteArray(jpegData, 0,
jpegData.Length))
{
using (System.IO.FileStream fs = new
System.IO.FileStream(Program.AppImageFileSpec, System.IO.FileMode.Create))
{
   bitmap.Compress(Android.Graphics.Bitmap.CompressFormat.Jpeg, 75, fs);
   var sizeInfo = fs.Length;// System.ObjectDisposedException: The object
used after being disposed.
    fs.Close();
}
}

I tried it under 4.1 and it worked fine - any ideas?

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/MfA-4-2-2-FileStream-Length-System-ObjectDisposedException-tp5710046.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to