C# Class Design Question

Posted by Soo on Stack Overflow See other posts from Stack Overflow or by Soo
Published on 2010-05-10T20:16:34Z Indexed on 2010/05/10 20:24 UTC
Read the original article Hit count: 373

Filed under:
|
|

This is a super newbie question, I've been programming for a while, but am just learning OOP. I have a class that works with user input via the C# console.
There are different methods in this class to gather different input sets.

I have another class that takes these input sets and puts them in a database.
What is the best way to pass the input from my input class to my database insert class?

My guess would be:

Array1[] = inputClass.GetParameterSet1();
DatabaseInsertClass.InsertIntoDatabase1(Array1[]);

Is there anything wrong with this or is there a better way to do this? Should I even have two classes (The database class could also take the user input)?

© Stack Overflow or respective owner

Related posts about c#

Related posts about classes