how to do if string contains c# code example Example: c# string contains bool b = s1.Contains("myString");