* Graphics.cs: Fixes exception type at FromImage method
svn path=/trunk/mcs/; revision=50363
+2005-09-21 Jordi Mas i Hernandez <jordi@ximian.com>
+
+ * Graphics.cs: Fixes exception type at FromImage method
+
2005-09-20 Vladimir Krasnov <vladimirk@mainsoft.com>
* Graphics.jvm.cs: bitmap resolution fix in DrawImage
{
IntPtr graphics;
- if (image == null) throw new ArgumentException ();
+ if (image == null)
+ throw new ArgumentNullException ();
Status status = GDIPlus.GdipGetImageGraphicsContext (image.nativeObject, out graphics);
GDIPlus.CheckStatus (status);
g.Dispose ();
}
-
[Test]
public void LoadIndexed ()
{
Image x = Image.FromStream (str);
Graphics g = Graphics.FromImage (x);
}
+
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void FromImage ()
+ {
+ Graphics g = Graphics.FromImage (null);
+ }
}
}