c# check if string contains substring in position code example Example: c# string contains bool b = s1.Contains("myString");