I
I
Ivan Vyrov2016-10-19 17:13:31
C++ / C#
Ivan Vyrov, 2016-10-19 17:13:31

How to convert string[] to List?

Good afternoon!
It seems to be a banal question, but somehow there are no thoughts on how to do this, tell me ...
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)

var stringArray = new string[];
var list = new List(stringArray)
или
list.AddRange(stringArray);
или
List list = stringArray.OfType().ToList();

A
Anatoliy Mikhailov, 2016-10-19
@yamaoto

using System.Linq;
...
var list = myArray.ToList();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question