find substring in c# code example
Example 1: how to look for substring in string in c#
String phrase = "this is the ultimate string";
Console.WriteLine(phrase.Contains("this")); //returns True
Console.WriteLine(phrase.Contains("python")); //returns False
Example 2: c# find substring in string
string fullName = "John Doe";
bool nameInFullName = fullName.Contains("John");
// nameInFullName is true