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

Submitted by:  Heiko Weiss <brubbel>
Submitted on:  Wed 16 Mar 2005 04:42:16 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned 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>
Project 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>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 17 Mar 2005 07:54:43 AM UTCdrobossonStatusNone=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1