fork download
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Globalization;
  5. using System.Diagnostics;
  6. using System.IO;
  7. using System.Linq;
  8. using System.Linq.Expressions;
  9. using System.Net;
  10. using System.Text;
  11. using System.Configuration;
  12. using System.Text.RegularExpressions;
  13.  
  14. namespace ProgramConsole
  15. {
  16. public class Program
  17. {
  18. public static void Main(string[] args)
  19. {
  20. string s = "helloHellohi";
  21. string[] array = new string[] { "hello", "Hello", "hi", "Hi", "hey", "Hey", "Hay", "hey" };
  22.  
  23. foreach (var item in array)
  24. {
  25. if(s.Contains(item))
  26. Console.WriteLine(item);
  27. }
  28. }
  29. }
  30. }
Success #stdin #stdout 0.04s 34832KB
stdin
Standard input is empty
stdout
hello
Hello
hi