fork(3) download
  1. using System;
  2. using System.Globalization;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5.  
  6. public class Test
  7. {
  8.  
  9.  
  10. public static void Main()
  11. {
  12. String[] someArray = { "Test1", "test2", "test3", "TEST4" };
  13.  
  14. string toCheck = "TEST123";
  15.  
  16. if (someArray.Any(str => toCheck.IndexOf(str, StringComparison.OrdinalIgnoreCase) > -1))
  17. {
  18. Console.Write("Contains!");
  19. }
  20. else
  21. {
  22. Console.Write("Does not contain!");
  23. }
  24. }
  25. }
Success #stdin #stdout 0.03s 33904KB
stdin
Standard input is empty
stdout
Contains!