public const uint MaxValue = 0xffffffff;
public const uint MinValue = 0;
- public uint value;
+ internal uint value;
public int CompareTo (object v)
{
int len;
int i;
bool digits_seen = false;
+ bool has_negative_sign = false;
if (s == null)
throw new ArgumentNullException (Locale.GetText ("s is null"));
if (s [i] == '+')
i++;
+ else
+ if (s[i] == '-'){
+ i++;
+ has_negative_sign = true;
+ }
for (; i < len; i++){
c = s [i];
if (!digits_seen)
throw new FormatException ();
- return val;
+ if (has_negative_sign)
+ throw new OverflowException ();
+ return val;
}
[CLSCompliant(false)]
pos = Int32.JumpOverWhite (pos, s, false);
}
- if (pos < s.Length)
+ if (pos < s.Length && s [pos] != '\u0000')
throw new FormatException ("Input string was not in the correct format.");
if (negative)