[Mono-dev] System.Colletions.Generic.SortedList

Felix Marthaler mono-devel-list at marfix.net
Sat Oct 29 09:50:46 EDT 2005


Hi thanks for the answer.

>
> * Since the enumerator is private, can you use a `yield' based one?
> that will be cleaner. * The indentation is a bit funkey, please use
> tags

Yes that's right i have forget it to clean it. now it has to be okey.

> * When you do int pos = Array.IndexOf(this.sortedKeys, key); for
> Contains, etc, you should use binary search, as it will be faster

fixed now. thanks for this information.

> * It's cleaner to do if (blah) throw Exception; ... rather than if
> (!blah) ...; else throw Exception ();

it's changed

> * IDictionary.Remove argument checking is incorrect

fixed..

> * Needs test cases

I Tested it with the examples from msdn2 that works. I will do this as
soon as possible.

> * (does msft use some sort of tree structure here? -- this is only
> an initial impl, so it's not really necessary to be fully optimal).
> -- Ben

Felix

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SortedList.cs
Type: text/x-csharp
Size: 37061 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051029/bb54d79e/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20051029/bb54d79e/attachment-0001.bin 


More information about the Mono-devel-list mailing list