Moved ProviderCollectionTest.cs from System assembly to System.Configuration.
[mono.git] / mcs / class / corlib / System.Reflection / FieldInfo.cs
index 7ee109b8a72dec192eedafaf0505100ed2894297..f019bc2d7821b4c209d69ef7cf1e3850a09bf54d 100644 (file)
@@ -132,7 +132,7 @@ namespace System.Reflection {
                        }
                }
 
-               public abstract void SetValue (object obj, object val, BindingFlags invokeAttr, Binder binder, CultureInfo culture);
+               public abstract void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, CultureInfo culture);
 
 #if ONLY_1_1
                public new Type GetType ()
@@ -153,6 +153,8 @@ namespace System.Reflection {
 
                public static FieldInfo GetFieldFromHandle (RuntimeFieldHandle handle)
                {
+                       if (handle.Value == IntPtr.Zero)
+                               throw new ArgumentException ("The handle is invalid.");
                        return internal_from_handle_type (handle.Value, IntPtr.Zero);
                }
 
@@ -160,6 +162,8 @@ namespace System.Reflection {
                [ComVisible (false)]
                public static FieldInfo GetFieldFromHandle (RuntimeFieldHandle handle, RuntimeTypeHandle declaringType)
                {
+                       if (handle.Value == IntPtr.Zero)
+                               throw new ArgumentException ("The handle is invalid.");
                        return internal_from_handle_type (handle.Value, declaringType.Value);
                }
 #endif