Dinesh Santhalingam

Dinesh Santhalingam

  • NA
  • 737
  • 368.4k

How to add Item to a list in c#?

Jan 23 2017 4:32 AM
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)