473,387 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1865
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.