fork download
  1. namespace Test
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6.  
  7. /// <summary>
  8. ///
  9. /// </summary>
  10. public class Program
  11. {
  12. /// <summary>
  13. ///
  14. /// </summary>
  15. public static void Main()
  16. {
  17. List<string[]> data = new List<string[]> {
  18. new[] { "longenough", "short" },
  19. new[] { "short", "longenough" },
  20. new[] { "short", "short" } };
  21.  
  22. var allRowsHavingSomeWordWithLengthGreaterThanFive = (from d in data
  23. where d != null
  24. from c in d
  25. where c != null && c.Length > 5
  26. select d).ToArray();
  27.  
  28. foreach (var row in allRowsHavingSomeWordWithLengthGreaterThanFive)
  29. {
  30. foreach (var str in row)
  31. {
  32. Console.Write(str);
  33. Console.Write(" ");
  34. }
  35.  
  36. Console.WriteLine();
  37. }
  38. }
  39. }
  40. }
  41.  
Success #stdin #stdout 0.03s 35000KB
stdin
Standard input is empty
stdout
longenough short 
short longenough