fork download
  1. using static System.Console;
  2. using System.Collections.Generic;
  3.  
  4. public class Program {
  5. public static void Main() {
  6. List<string> names = new List<string>();
  7. names.Add("Bruce");
  8. names.Add("Alfred");
  9. names.Add("Tim");
  10. names.Add("Richard");
  11. names.ForEach(Print);
  12. names.ForEach((string name) => WriteLine(name));
  13. }
  14.  
  15. private static void Print(string s) => WriteLine(s);
  16. }
  17.  
  18. //https://pt.stackoverflow.com/q/98297/101
Success #stdin #stdout 0.02s 15968KB
stdin
Standard input is empty
stdout
Bruce
Alfred
Tim
Richard
Bruce
Alfred
Tim
Richard