[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);
Post your comments / questions
Recent Article
- How to Encode & Decode using Base64 in Python?
- Unspecified error-The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support.
- How to generate a Captcha verification code image with Python?
- How to show an image using path python PIL?
- How to remove Background from the images using Python?
- Python generate QR code image
- Insert excel file data into MySQL database in Python
- ImportError: Missing optional dependency 'xlrd' | How tot Convert xls to xlsx | Python
Related Article