String Contains a string
using System;
class MainClass {
public static void Main() {
string str = "abcdefghijk";
if(str.Contains("def"))
Console.WriteLine("The sequence 'def' was found.");
}
}
Output The sequence 'def' was found.
|
HTML code for linking to this page:
|