How to write whole list? from System.Collections.Generic.List`1[System.String]?


I have created a list, now I want to display this list in one go? That is to say without using For each loop.




Please try the following code below:
String.Join(Environment.NewLine, list.Select(Function(a) String.Join("", a)))


You don’t need the .Select, since List<T> already implements IEnumerable (if it wouldn’t, the Select call would actually be invalid since it’s from that interface :wink: ).
String.Join(Environment.NewLine, yourList)
will work just fine (same goes for arrays).