المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : LinkedList since .NET 2 [modified]



C# Programming
04-14-2011, 03:32 PM
Hey how many of you don't know about LinkedList? (http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx)[^ (http://msdn.microsoft.com/en-us/library/he2s3bh7.aspx)]

It's been available since .NET 2!! And I missed it seems like it's not been discussed a lot. In fact many discussions omitted such important class. (http://www.techrepublic.com/article/getting-to-know-the-net-collections/1045372)[^ (http://www.techrepublic.com/article/getting-to-know-the-net-collections/1045372)]

Any specific article which discuss and compare among various .NET collection classes now in terms of fetch-by-key/insert/remove/add/memory al********/performance (polynomial time, linear time...etc) similar to cplusplus.com (http://cplusplus.com/reference/stl/list/insert/)[^ (http://cplusplus.com/reference/stl/list/insert/)]

Gosh how the hell did I miss such important subject.

REF 1: MSDN Chapter 5 — Improving Managed Code Performance
- no reference of LinkedList but ListDictionary (http://msdn.microsoft.com/en-us/library/ff647790.aspx#scalenetchapt05_topic30)[^ (http://msdn.microsoft.com/en-us/library/ff647790.aspx#scalenetchapt05_topic30)]

REF 2: That's more like it... read this comparison. (http://www.artima.com/forums/flat.jsp?forum=152&thread=179998)[^ (http://www.artima.com/forums/flat.jsp?forum=152&thread=179998)] My question for this article is, "Insert" -- are they refering to "insert in middle of the list"? Of "Add" which adds to end of list? But, for example, for Dictionary only supports "Add", there's no such thing as "Insert". "Insert" is supported by "IList" however. Seems like article did not distinguish between add and insert.

REF 3: This seems to be the winner!! (http://www.codethinked.com/an-overview-of-system_collections_generic)[^ (http://www.codethinked.com/an-overview-of-system_collections_generic)]

Anything else?

Anyway, seems like 99% of applications we got by with Generic List/Dictionary (reasonable performance no op exceeds polynomial time) without LinkedList (all good except lookup). Does anybody has a good scenario as an example where they'd need LinkedList?
dev
modified on Wednesday, April 13, 2011 10:31 PM