+2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * Int32.cs:
+ * UInt32.cs:
+ * Int64.cs:
+ * UInt64.cs: changed Type.GetType () by typeof (), as suggested by
+ lupus.
+
+ * Int32.cs:
+ * Int64.cs: throw an OverFlowException when parsing a string
+ containing a dot followed by any non '0' number.
+
2002-04-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* Byte.cs:
NumberFormatInfo nfi;
if (fp != null) {
- Type typeNFI = Type.GetType ("System.Globalization.NumberFormatInfo");
+ Type typeNFI = typeof (System.Globalization.NumberFormatInfo);
nfi = (NumberFormatInfo) fp.GetFormat (typeNFI);
}
else
// Allows decimal point as long as it's only
// followed by zeroes.
if (s [pos++] != '0')
- throw new FormatException ("Input string was not in the " +
- "correct format.");
+ throw new OverflowException ("Value too large or too " +
+ "small.");
}
else {
nDigits++;
NumberFormatInfo nfi;
if (fp != null) {
- Type typeNFI = Type.GetType ("System.Globalization.NumberFormatInfo");
+ Type typeNFI = typeof (System.Globalization.NumberFormatInfo);
nfi = (NumberFormatInfo) fp.GetFormat (typeNFI);
}
else
// Allows decimal point as long as it's only
// followed by zeroes.
if (s [pos++] != '0')
- throw new FormatException ("Input string was not in the " +
- "correct format.");
+ throw new OverflowException ("Value too large or too " +
+ "small.");
}
else {
nDigits++;
NumberFormatInfo nfi;
if (fp != null) {
- Type typeNFI = Type.GetType ("System.Globalization.NumberFormatInfo");
+ Type typeNFI = typeof (System.Globalization.NumberFormatInfo);
nfi = (NumberFormatInfo) fp.GetFormat (typeNFI);
}
else
NumberFormatInfo nfi;
if (fp != null) {
- Type typeNFI = Type.GetType ("System.Globalization.NumberFormatInfo");
+ Type typeNFI = typeof (System.Globalization.NumberFormatInfo);
nfi = (NumberFormatInfo) fp.GetFormat (typeNFI);
}
else