Article View: borland.public.csharpbuilder.language.csharp
Article #329Re: DelphiINOperator
From: Jon Shemitz
Date: Thu, 04 Aug 2005 18:07
Date: Thu, 04 Aug 2005 18:07
16 lines
1345 bytes
1345 bytes
Jeff wrote: > I have the following Delphi syntax: > > if (I in [1, 2, 3]) then > ...... > > What would be the C# syntax? A Hashtable makes a pretty decent set. It's a bit wasteful of memory (it stores key/value pairs, and you're ignoring the value) but .ContainsKey() is a lot faster than an ArrayList's .IndexOf(). -- www.midnightbeach.com
Technical Details
Message-ID:
<42F25946.2B1C4166@midnightbeach.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<42f245e2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,2da0c8faa466f786 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit Message-ID: <42F25946.2B1C4166@midnightbeach.com> Date: Thu, 04 Aug 2005 11:07:02 -0700 From: Jon Shemitz <jon@midnightbeach.com> Reply-To: jon@midnightbeach.com Organization: Midnight Beach X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en-US,en MIME-Version: 1.0 Newsgroups: borland.public.csharpbuilder.language.csharp Subject: Re: DelphiINOperator References: <42f245e2$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 63.249.104.197 X-Trace: newsgroups.borland.com 1123178829 63.249.104.197 (4 Aug 2005 11:07:09 -0700) Lines: 16 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail