c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
c# .net

how to convert array of strings to list?

| | ASP-NET , CSharp

[Solved]how to convert array of strings to list?


string[] arr = { "rasik", "thivan", "mydeen" };

 If  you want to convert array  to list


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

foreach (string arrItem in arr){   
Liststring.Add(arrItem);
}

Without going for looping standard way to convert to list.


string[] arr = { "rasik", "thivan", "mydeen" };

List<string> list = new List<string>(arr);