Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • C#

Idiom #243 Print list

Print the contents of the list or array a on the standard output.

a.ForEach(Console.WriteLine);

a is a List

This prints one line per element.
Console.WriteLine( string.Join(", ", a) );

a is an array or an IEnumerable collection
(print a)

New implementation...