🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #9641

Re: Doble.Parse( String ) - nie działa - Help !!

#9641
From: Artur S.
Date: Fri, 28 Oct 2005 11:09
23 lines
1617 bytes
aragornx@poczta.fm napisał(a):
> Witam
> 
>    Zaczynam zabawe z .NET'em - poprzednio C++ i Java. No i pojawił
> się problem.
> 
>    Stringa s = "45.5";
>    double val = Double.Parse(s);
> 
>    i generuje mi wyjątek FormatException ???
> 
>    O co chodzi? Czy może o to, że pobiera polskie formatowanie i
> potrzebuje przecinka zamiast kropki? - Ale to mnie nie zadowala -
> potrzebuje reakcje na kropkę !! Pomocy...
> 

Double.Parse(s.Replace(".",","))

to oczywiście jest rozwiązaniem, gdy w systemie jest mamy ustawiony 
przecinek :/

Pozdrawiam
Artur S.
Technical Details
Message-ID: <djt0dn$jk4$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <1130493549.772165.234810@o13g2000cwo.googlegroups.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "Artur S." <arturstan@poczta_nie_spamuj.onet.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: Doble.Parse( String ) - nie działa - Help !!
Date: Fri, 28 Oct 2005 13:09:15 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 23
Message-ID: <djt0dn$jk4$1@atlantis.news.tpi.pl>
References: <1130493549.772165.234810@o13g2000cwo.googlegroups.com>
NNTP-Posting-Host: cqi46.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1130497272 20100 83.31.240.46 (28 Oct 2005 11:01:12 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Fri, 28 Oct 2005 11:01:12 +0000 (UTC)
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: pl, en-us, en
In-Reply-To: <1130493549.772165.234810@o13g2000cwo.googlegroups.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit