fork download
  1. using static System.Console;
  2. using System.Collections.Generic;
  3. public class Program {
  4. public static void Main() {
  5. ImprimeValores(null);
  6. ImprimeValores(new List<int>());
  7. ImprimeValores(new List<int> { 1, 2, 3 });
  8. }
  9. static void ImprimeValores(IList<int> values) {
  10. if (values != null) foreach(int v in values) WriteLine("value:" + v);
  11. }
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/129966/101
Success #stdin #stdout 0.02s 16092KB
stdin
Standard input is empty
stdout
value:1
value:2
value:3