How to add items into List collection?

 Posted by Rajesh_Kumar on 1/18/2014 | Category: C# Interview questions | Views: 685 | Points: 40
Answer:

With the help of Add method,we can add items into List collections:-
We have to import using System.Collections.Generic Namespace.

For Example:-

List<string> lst_courses = new List<string>();

lst_courses.Add("C#");
lst_courses.Add("VB.Net");


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response