0

For example, I have a string "ZONE123". Is there a way to get 'true' value when comparing it to substring "zone" - some kind of '.Contains("zone")'?

Perotto
  • 194
  • 1
  • 14

1 Answers1

1

You can use IndexOf function:

   string s = "ZONE123";
   s.IndexOf("ZONE", StringComparison.InvariantCultureIgnoreCase) >= 0
EylM
  • 5,967
  • 2
  • 16
  • 28