Contains - String Functions
Join the DZone community and get the full member experience.Join For Free
Check whether sentence contains a word:
string sentence = "Dot net zone"; bool isZoneExist = sentence.Contains("zone"); Console.Write("Sentence contains 'zone': "); Console.WriteLine(isZoneExist);
Strings Data Types
Opinions expressed by DZone contributors are their own.