dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #12341] double.Parse( string ) does not work


From: Heiko Weiss
Subject: [Pnet-developers] [bugs #12341] double.Parse( string ) does not work
Date: Wed, 16 Mar 2005 16:42:18 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12341>

                 Summary: double.Parse( string ) does not work
                 Project: DotGNU Portable.NET
            Submitted by: brubbel
            Submitted on: Mit 16.03.2005 um 16:42
                Category: None
                Severity: 5 - Average
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open

    _______________________________________________________

Details:


1. it ignores the current culture of the current thread.
2. it doesn't parse correct because it uses the CurrencyDecimalSeparator to
parse, not the NumberDecimalSeparator.

Sample:
      CultureInfo m_CultureInfo = (CultureInfo)
Thread.CurrentThread.CurrentCulture.Clone();
      
      m_CultureInfo.NumberFormat.NumberDecimalSeparator = ".";
      m_CultureInfo.NumberFormat.NumberGroupSeparator   = "";
      Thread.CurrentThread.CurrentCulture = m_CultureInfo;
      
      Console.WriteLine(
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator );

      double f = float.Parse( "123.45" );
      Console.WriteLine( f );
      Console.ReadLine();







    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12341>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]