New test.
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / Unit.cs
index 5e5e4e63d56060236d1a933352ff9a4250e6a81f..830f6477b099fecb4e596f56ec1ad62184d623be 100644 (file)
@@ -39,7 +39,6 @@ namespace System.Web.UI.WebControls {
 #else
        // CAS
        [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-       [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
 #endif
        public struct Unit {
                UnitType type;
@@ -85,6 +84,8 @@ namespace System.Web.UI.WebControls {
                                i++;
                                if (!Char.IsDigit (value [i]))
                                        throw new ArgumentOutOfRangeException ("value");
+                       } else if (!Char.IsDigit (value [i])) {
+                               throw new FormatException ();
                        }
 
                        double dv = 0;