473,667 Members | 2,748 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What kind of linked-list generic do they mean?

Hello!

What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.

When I create a linked-list generic class for example with the string type.
I do the following.
List<stringmyLi st = new List<string>();

So what can they mean when they say different objects types.

Does it sounds reasonable that they mean a linked-list of object like this
List<ObjectmyLi st = new List<Object>();

//Tony
Oct 16 '08 #1
4 3264
On Thu, 16 Oct 2008 11:53:17 -0700, Tony Johansson
<jo************ *****@telia.com wrote:
What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.
Impossible to say for sure without more context.
When I create a linked-list generic class for example with the string
type.
I do the following.
List<stringmyLi st = new List<string>();
That's not a linked list.
So what can they mean when they say different objects types.

Does it sounds reasonable that they mean a linked-list of object like
this
List<ObjectmyLi st = new List<Object>();
No. But perhaps they mean this:

LinkedList<obje ctmyList = new LinkedList<obje ct>();

Pete
Oct 16 '08 #2
Hello!

I just wonder what advantages does a LinkedList<Thav e compared to List<T>
?

So is it possible to say in general when to use LinkedList<T>?

//Tony
"Peter Duniho" <Np*********@nn owslpianmk.coms krev i meddelandet
news:op******** *******@petes-computer.local. ..
On Thu, 16 Oct 2008 11:53:17 -0700, Tony Johansson
<jo************ *****@telia.com wrote:
>What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.

Impossible to say for sure without more context.
>When I create a linked-list generic class for example with the string
type.
I do the following.
List<stringmyL ist = new List<string>();

That's not a linked list.
>So what can they mean when they say different objects types.

Does it sounds reasonable that they mean a linked-list of object like
this
List<ObjectmyL ist = new List<Object>();

No. But perhaps they mean this:

LinkedList<obje ctmyList = new LinkedList<obje ct>();

Pete

Oct 16 '08 #3
On Thu, 16 Oct 2008 13:12:27 -0700, Tony Johansson
<jo************ *****@telia.com wrote:
I just wonder what advantages does a LinkedList<Thav e compared to
List<T>
The primary advantage is that it's much faster (and simpler) to insert
into or remove an element from a LinkedList<Ttha n into a List<T>, except
for operations at the very end of the list. Those operations for a
List<Trequire the entire contents of the data structure after the point
of modification to be copied, whereas for a LinkedList<Ttho se operations
can always be completed in constant time, just by modifying a fixed number
of pointers.
So is it possible to say in general when to use LinkedList<T>?
LinkedList<Thas more overhead. So I would only use it when I expect to
spend a lot of time modifying the list in ways other than adding or
removing from the very end. Otherwise, List<Tis probably preferable.

Pete
Oct 16 '08 #4
Tony Johansson wrote:
What actually does this sentence mean?
Create a linked-list generic class that enables you to create a chain of
different objects types.
I think they want you to write your own LinkedList<impl ementation.

Arne
Oct 16 '08 #5

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

Similar topics

4
2575
by: nib | last post by:
What kind of problems is visual basic best at solving?
0
1199
by: Claudio Grondi | last post by:
Hi, I have just by chance discovered, that Microsoft research works on a kind of programming language called AsmL, and I'm just curious if AsmL, which is using same concept of significant indentation as Python language, was developed fully independently or is there a kind of relationship (same person in developer team, etc.)? Maybe someone can give here some hints?
39
2897
by: Holly | last post by:
I'm trying to validate my code and I can't figure out what kind of doctype I have. The validator can't tell me anything because it can't move beyond the doctype declaration. http://www.wavian.com/clients/pugwash/ Is there anyway to tell what kind of doctype this is? I tried inserting a few different types (please excuse me if this is the stupid way to do it, I am learning...) but am unsuccessful.
5
20447
by: pinballjim | last post by:
Hello everyone, I'm looking for a simple way to create a local copy of a linked table. I've got a database that links about 10 tables from other databases. This works fine on my machine, but I need to distribute one single database to others and cannot have any linked tables. The only way I've figured out is to run the linked tables through Make Table queries to make a temporary table, delete the linked table, and
2
2683
by: Robert McGregor | last post by:
Hi all, I've got a Front End / Back End database that was working just fine. One day i opened the FE to find that if I tried to open one of the linked tables from the database window, nothing happened (hourglass for about 2 seconds then nothing). I tried relinking the tables and got the same response. (Access even completely bombed out once with a Dr Watson failure).
1
1485
by: Phil Abrahamsen | last post by:
Access 2002: Example: Master record: ID#, Name Linked records: ID#, Member year If a member for the last 3 years you have 3 linked records withmember year = 2002, 2003, and 2004. I want to find all ID#'s that were members in 2003 but NOT 2004. A query for member year = 2003 and <> 2004 yields ALL 2003 records because the 2003 record = 2003 and NOT 2004.
29
5885
by: A.P. Hofstede | last post by:
Could someone tell me where MS-Access (current and 97?) fit(s) on the RDBMS - ORDBMS - ODBMS spectrum? I gather it's relational, but how does it size up against/follow SQL2/3/4 definitions and how does it compare to other database vendors? Any articles that might be of interest? It's for an essay on database models... Thanks in advance, Alex
2
6007
by: Jill Elaine | last post by:
I am building an Access 2002 frontend with linked tables to an encrypted Paradox 7 database. When I first create these linked tables, I'm asked for the password to the encrypted Paradox database, and the linked tables are successfully created. I use the data from these linked tables in several forms. All works great until I close the Access frontend and open it again. When I try to use the forms, I get an error message: "Could not...
25
45746
by: bubbles | last post by:
Using Access 2003 front-end, with SQL Server 2005 backend. I need to make the front-end application automatically refresh the linked SQL Server tables. New tables will be added dynamically in the future, so the front-end application must have a way to keep up with this (instead of manually linking them).
12
2372
by: contactmayankjain | last post by:
Hi, Its said that one should avoid dynamic allocation of memory, as it de- fragment the memory into small chunks and allocation of memory is a costly process in terms of efficiency. So what is the best solution to handle to situation in which we need to allocate memory at run time. Regards Mayank Jain(Nawal)
0
8458
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8565
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8650
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4372
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2779
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 we have to send another system
2
2017
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.