var s = "hello world"; Console.WriteLine(s.Contains("world")); Console.WriteLine(s.StartsWith("hello")); // IndexOf returns -1 when not found Console.WriteLine(s.IndexOf('o'));
membership and search