TARGET_JVM: making public
[mono.git] / mcs / class / System.Data / System.Data.Common / DbDataPermissionAttribute.cs
index ad717d1955fc317d2fbdb96bf9de4c17c6118129..f29c3d17eafe2176ce2c91b70888958ff8ea7f00 100644 (file)
@@ -32,6 +32,7 @@
 
 using System.ComponentModel;
 using System.Security.Permissions;
+using System.Globalization;
 
 namespace System.Data.Common {
 
@@ -91,7 +92,11 @@ namespace System.Data.Common {
                        set {
                                if (!Enum.IsDefined (typeof (KeyRestrictionBehavior), value)) {
                                        string msg = Locale.GetText ("Unknown value.");
+#if NET_2_0
                                        throw new ArgumentOutOfRangeException ("KeyRestrictionBehavior", value, msg);
+#else
+                                       throw new ArgumentException ("KeyRestrictionBehavior", msg);
+#endif
                                }
                                keyRestrictionBehavior = value;
                        }