Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 3rd, 2004, 02:08 AM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default data structures in C#

hello.

I'm moving from C++ to .net (C#) and would like to know if there are
any good books on data strucutures, what to use when. For example what would I use in C# where I made use of a linked list in C++.
Also there seems to be no books about algorithms with C# code published?

regards, Xanoo

 
Old May 5th, 2004, 09:18 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Algorithms are just algorithms aren't they? Isn't that just a matter of learning C# and converting C++ algorithms to C#?
 
Old May 5th, 2004, 02:05 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I agree with you Peter... Algorithms are abstract, and should be independent of prorgamming language. However some people feel more comfortable explaning an algorithm in a known programming language.

I would say that the same more or less apply for data structures. I have read the book Introduction to Algorithms by Cormen, Leiserson and Rivest. It is a good and thorough book that covers data structures and algorithms with various functionality.

Jacob.
 
Old May 5th, 2004, 09:50 PM
Registered User
 
Join Date: Jul 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok I have an example of a structure..

I have in C++ made a Linked list with Sports objects, with a side list with League objects. In this there would be an array of team objects and a two dimensional array of matches.

In C# I would try to make an ArrayList called sportsList. Inside would be ArrayLists of leagueList. One such list would have an array of team objects.

How would I setup access to this this array, or individual team objects?

In C++ I would take out each object and make a help-pointer to the object I would be interested in working with, though since there are no pointers in C# I assume there is another way to set a reference to a nested object.

Same goes with executing methods in an object from another object.

regards, xan

 
Old July 1st, 2004, 03:44 PM
Authorized User
 
Join Date: Jul 2004
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default

An easy answer without all of the conjecture is that an ArrayList is close to a link list except a lot easier to use. You will probably find it a little bulky overhead wise though.


www.CoderForRent.com
Get A Computer Job!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Topics needed in Data Structures c.vikramnarayan C++ Programming 1 June 19th, 2009 09:56 PM
data structures problems detence C++ Programming 1 April 11th, 2007 11:27 AM
Algorithms Data Structures p0120144 C++ Programming 3 March 25th, 2006 08:34 AM
data structures silvia C# 4 January 19th, 2006 04:25 AM
Complex Data Structures misterqj General .NET 2 March 19th, 2005 04:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.