[Mono-bugs] [Bug 661996] Hexadecimal NumericUpDown control only accepts the digits 0-9
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Jan 9 00:25:21 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=661996
https://bugzilla.novell.com/show_bug.cgi?id=661996#c2
--- Comment #2 from Oliver Thimm <oliver.thimm at web.de> 2011-01-09 05:25:20 UTC ---
I think you should leave the parser for decimal values as is so I suggest to
change the current implementation:
if (!hexadecimal) {
Value = Check (decimal.Parse (Text, CultureInfo.CurrentCulture));
} else {
#if !NET_2_0
Value = Check (Convert.ToDecimal (Convert.ToInt32 (Text, 16)));
#else
Value = Check (Convert.ToDecimal (Convert.ToInt32 (Text, 10)));
#endif
}
into
if (!hexadecimal) {
Value = Check (decimal.Parse (Text, CultureInfo.CurrentCulture));
} else {
Value = Check (Convert.ToDecimal (Convert.ToInt32 (Text, 16)));
}
In combination with your patch for bug 661750 this should mimic the .NET
behaviour.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list