6
Answers

How to add Item to a list in c#?

I have some Values. I want to add it to the list.
Ex:
  1. List<string> mylist1 = new List<string>() ;  
  2. string name="dinesh";  
  3. Int age =16;
  4. string bike="Hero"  
  5. mylist1.Add(Name,Age,bike);//can't able to add  
How to rectify this error? 
Answers (6)