Over a million developers have joined DZone.

Contains - String Functions

·
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:

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

{{ parent.tldr }}

{{ parent.urlSource.name }}