473,473 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Why no LinkedList?

Why isn't there a LinkedList in .NET?
Was the reason that the mark&sweep GC algorithm has problems with heavily
linked data?

A LinkedList is very important is you have huge lists and append a new
element you just create this objekt and set a reference in contrast to an
arraylist where you have to copy the whole array and create a new one with
the double size.

Additionally removing elements in an ArrayList is a very expensive
operation: all elements behind the removed element has to be copied to fill
the hole. With LinkedList you just have to relink to element to remove
everything between them.

I was hoping that Whidbey would provide a LinkedList but I looked in the
beta and there was nothing.

So what are the reasons behind this decision?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Nov 22 '05 #1
1 1866
Cody:

Behind the scenes they are used all over the place in .NET and you can
easily code one yourself. Back in the old days of C++ I had to write my own
so I did the same in C# just for fun. If you search google for Linked LIst
C# there are hundreds of examples...
http://csharpcomputing.com/Tutorials/Lesson9.htm

Maybe I"m missing your point with ArrayLists though...they don't necessitate
the use of an Array at all, so I'm probably misunderstanding your point.
Can you explain that part a little more b/c I don't think I follow you.
"cody" <pl*************************@gmx.de> wrote in message
news:#c**************@TK2MSFTNGP11.phx.gbl...
Why isn't there a LinkedList in .NET?
Was the reason that the mark&sweep GC algorithm has problems with heavily
linked data?

A LinkedList is very important is you have huge lists and append a new
element you just create this objekt and set a reference in contrast to an
arraylist where you have to copy the whole array and create a new one with
the double size.

Additionally removing elements in an ArrayList is a very expensive
operation: all elements behind the removed element has to be copied to fill the hole. With LinkedList you just have to relink to element to remove
everything between them.

I was hoping that Whidbey would provide a LinkedList but I looked in the
beta and there was nothing.

So what are the reasons behind this decision?

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: J Peterman | last post by:
Im having a nightmare trying to understand these nodes and linked lists. I've posted my code for my node.h, node.cpp, linkedlist.h and linkedlist.cpp files in separates replies. Can someone...
2
by: Justin Crites | last post by:
I have an object which I want to be serializable. I have marked with with . The object only has a single data member, which is a LinkedList<int>. This linked list is a private member and cannot...
6
by: Phillip.Ross.Taylor | last post by:
When I designed my application I created an object called "Orderable" which exposes a public property "sequence". Then a few objects inherit from this. I'll just call them ObjectX for the sake...
3
by: huiling25 | last post by:
I don't know why the customer records cannot be inserted into the linked list and the head of the linked list keep pointing to null... //ListNode.java public class ListNode{ private Object...
1
by: CaseySimplified | last post by:
I am writing a LinkedList class from scratch without using the already defined LinkedList class. The only thing that doesn't seem to be working is adding removing and getting the last link in the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.