Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 22nd, 2006, 04:03 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need some more help please

Ok so heres my problem. I need to ...

Add the method AddArtist. This Method will receive the first name (ArtFName), last name (ArtLName) and the artist ID (artID) from the user (in a console app) and pass them along to the Artist constructor.
AddArtist uses the List.Add method to create a new Artist Instance and add it to the Artists Collection. (I am using the OOP technique for this project also)

 This would be greatly appreciated ASAP as I am already super far behind on this project. THANK YOU!!!!
Reply With Quote
  #2 (permalink)  
Old June 22nd, 2006, 04:25 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Is this a commercial project or your homework?

In the first case, interesting requirements....

In the latter case: do you think it's fair to let us do your homework?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote
  #3 (permalink)  
Old June 22nd, 2006, 04:31 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Its actually a project I'm doing for a family member but im running behind on it because of other commitments and ineed help...The requirements might seem interesting but they're not lol...Its a program for a computerized Gallery system ...keeping track of an Art Gallery.

Reply With Quote
  #4 (permalink)  
Old June 23rd, 2006, 05:24 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
quote:The requirements might seem interesting but they're not lol
The way they were put still make them sound like homework.

ANyway, what part of the assignment are you having problems with? Do you know how to create a method that takes the requested parameters? And do you know how to new up an instance of the Artist?

And what version of C# are you using? You could use generics for the List if you were using C# 2; otherwise, you would need to create a custom collection, or use one of the existing classes.

If you let us know what specific area you have problems with, maybe we can help. I am not going to write the entire code for you, if you don't mind.

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote
  #5 (permalink)  
Old June 23rd, 2006, 05:34 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok I'm working in a comsole app at the moment I to Call a method (which i have done) and pass the three variables input by the user (which i have done). I need to know how to store that artist to a collection and i also need to know how to use that collection to display a list of the artists in the collection to the console. I'm using Visual STudio .Net C#.......Its not the @nd edition.
Thanks alot for your help...I dont expect the full coding as I wouldn't learn it at all. But if you could help in anyways that would be great.

Reply With Quote
  #6 (permalink)  
Old June 25th, 2006, 04:06 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

If you can't use Generics (part of .NET 2) you could use a class like the ArrayList (http://msdn2.microsoft.com/en-us/lib...arraylist.aspx) that allows you to add objects.

Items in an ArrayList can be looped through with a For Each / foreach construct...

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Reply With Quote
  #7 (permalink)  
Old June 26th, 2006, 03:05 PM
Registered User
 
Join Date: Jun 2006
Location: , , .
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ahhh **** i forgot about that. thanks a lot man.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 03:07 PM.


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