fork(4) download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. string record1 = "1,3,5,7,9,10";
  9. string record2 = "4,5,10";
  10. string[] records = new[] { record1, record2 };
  11. string record = records.FirstOrDefault(r => r.Split(',').Any(s => s == "1"));
  12. Console.WriteLine(record);
  13. }
  14. }
Success #stdin #stdout 0.02s 33896KB
stdin
Standard input is empty
stdout
1,3,5,7,9,10