R
Rico
Hello Everyone,
I observed something strange in some quick testing code:
void Button1Click(object sender, System.EventArgs e)
{
CultureInfo culture = new CultureInfo("th-TH", false);
tbxDisplayResult.Text = DateTime.Parse(tbxInputArea.Text,
culture).ToString("yyyy MMMMMMMMMM dd");
}
with tbxInputArea.Text of "10.9.2006",
tbxDisplayResult.Text is displayed as "1463 September 10".
Thailand might have taken huge steps backwards over the past 24 hours, but
I doubt it's steps of that magnitude, isn't it?
==========================================================
void Button1Click(object sender, System.EventArgs e)
{
CultureInfo culture = new CultureInfo("ms-MY", false);
tbxDisplayResult.Text = Decimal.Parse(tbxInputArea.Text,
culture).ToString("N2");
}
tbxInputArea.Text of "1,973.00" results in a parsing error,
whereas with tbxInputArea.Text of "1.973,00" parsing succeeds.
I doubt that Malaysia uses decimal separators the way the Germans do.
Is that a bug in the framework?
Rico.
I observed something strange in some quick testing code:
void Button1Click(object sender, System.EventArgs e)
{
CultureInfo culture = new CultureInfo("th-TH", false);
tbxDisplayResult.Text = DateTime.Parse(tbxInputArea.Text,
culture).ToString("yyyy MMMMMMMMMM dd");
}
with tbxInputArea.Text of "10.9.2006",
tbxDisplayResult.Text is displayed as "1463 September 10".
Thailand might have taken huge steps backwards over the past 24 hours, but
I doubt it's steps of that magnitude, isn't it?
==========================================================
void Button1Click(object sender, System.EventArgs e)
{
CultureInfo culture = new CultureInfo("ms-MY", false);
tbxDisplayResult.Text = Decimal.Parse(tbxInputArea.Text,
culture).ToString("N2");
}
tbxInputArea.Text of "1,973.00" results in a parsing error,
whereas with tbxInputArea.Text of "1.973,00" parsing succeeds.
I doubt that Malaysia uses decimal separators the way the Germans do.
Is that a bug in the framework?
Rico.