Initialize List in C#

Following is the syntax for declaring a list in C# :

List NewList = new List();

Now elements can be added in this list using function :

NewList.Add(“Name1”);

NewList.Add(“Name2”);

Leave a Comment

Your email address will not be published. Required fields are marked *