Boguda Boguda

Boguda Boguda

  • NA
  • 27
  • 9.4k

Question about class

Sep 10 2014 4:45 PM

Hi I need some help about C#

I know it is elementary but I don't know how to do that. and also I works without database

I have class User with
string name;
string lastname;
int years;
 
and then a metod insert ()
{
  User us=new User();
    name=textbox1.Text;
    lastname=textbox2.Text;
    years=textbox3.Text; 
 Now for example I need to add(insert) tree(3) users and then write them in listbox, message box or something.
 
I hope I was clear enough and correctly ask the question
(How to read all instaces of the same class and also I need to sort them by year) 

Answers (7)