🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: jak to napisać w c#

#21381
From: Marcin Kral
Date: Fri, 26 Feb 2010 18:47
31 lines
1674 bytes
W dniu 2010-02-26 19:42, Wiktor Zychla pisze:
>> Myslałem żeby użyć jakoś LINQ-a ale nie daje rady, może ktoś pomóc?
>
> string test = "Ala ma kota";
> string reversed =
> string.Join(
> " ",
> test
> .Split()
> .Select( s => new string( s.ToCharArray().Reverse().ToArray() ) )
> .ToArray()
> );
>
> gdyby istniały przeciążona sygnatura dla string.Join przyjmująca
> IEnumerable i string miał metodę Reverse, to byłoby jeszcze ładniej:
>
> string.Join(
> " ",
> test
> .Split()
> .Select( s => s.Reverse() )
> );
>
> ale niestety tak dobrze nie ma.


extension metod? :)

-- 
Pozdrawiam
Marcin Kral
Technical Details
Message-ID: <hm94vs$m9v$2@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <049f031b-76af-4ef8-95eb-5062b2e446b1@v25g2000yqk.googlegroups.com> <1c885fec-e3e6-40d8-a1eb-59e84adcc336@15g2000yqi.googlegroups.com> <hm94se$blq$1@atlantis.news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Marcin Kral <kralu@poczta.na-onecie.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: jak to napisać w c#
Date: Fri, 26 Feb 2010 19:47:24 +0100
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 31
Message-ID: <hm94vs$m9v$2@inews.gazeta.pl>
References: <049f031b-76af-4ef8-95eb-5062b2e446b1@v25g2000yqk.googlegroups.com> <1c885fec-e3e6-40d8-a1eb-59e84adcc336@15g2000yqi.googlegroups.com> <hm94se$blq$1@atlantis.news.neostrada.pl>
NNTP-Posting-Host: cgv99.neoplus.adsl.tpnet.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1267210044 22847 83.30.249.99 (26 Feb 2010 18:47:24 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 26 Feb 2010 18:47:24 +0000 (UTC)
X-User: kralm
In-Reply-To: <hm94se$blq$1@atlantis.news.neostrada.pl>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit