Group: microsoft.public.dotnet.framework
From: "Muj Beg"
Date: Thursday, October 04, 2007 8:37 AM
Subject: Re: Collections od KEYS only : BOOLEAN VS OBJECT, False Vs Null/Nothing

Ah, I see.

Although one could do list.Sort() (once), followed by list.BinarySearch() to
gain seom of the same advantages.

"pamela fluente" wrote in message
news:1191312990.874006.46160@g4g2000hsf.googlegroups.com...
> On 2 Ott, 00:22, Jon Skeet [C# MVP] wrote:
>> Muj Beg wrote:
>> > By the way, just wanted to mention: If you want a collection of "keys"
>> > only,
>> > and not key/value pairs, why not just use the appropiate list class,
>> > such
>> > as:
>>
>> > List mykeys.
>>
>> Because checking whether a list contains an element or not is an O(n)
>> operation instead of an O(1) operation.
>>
>> --
>> Jon Skeet - http://www.pobox.com/~skeet
>> Blog:http://www.msmvps.com/jon.skeet
>> If replying to the group, please do not mail me too
>
> Yes and also because we are talking here about sorted list and
> dictionaries.
>