Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Contains - String Functions

DZone's Guide to

Contains - String Functions

·
Free Resource
Check  whether sentence contains a word:


        string sentence = "Dot net zone";
	bool isZoneExist = sentence.Contains("zone");
	Console.Write("Sentence contains 'zone': ");
	Console.WriteLine(isZoneExist);
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}