bugDotGNU Portable.NET - Bugs: bug #12341, double.Parse( string ) does not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #12341: double.Parse( string ) does not work

Submitter:  Heiko Weiss <brubbel>
Submitted:  Wed 16 Mar 2005 04:42:16 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Thu 17 Mar 2005 07:54:43 AM UTC, comment #1: 

Fixed by patch #3833



fixed in cvs

Deryk Robosson <drobosson>
Group Member
Wed 16 Mar 2005 04:42:16 PM UTC, original submission:  


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();

Heiko Weiss <brubbel>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-03-17 drobosson StatusNone Fixed
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-aa77.
Corresponding source code