Over a million developers have joined DZone.

C# Function - StrartsWith

·
StartsWith function is used to check whether string starts with specific word.


	string sentence = "This is dot net zone snippet";

	if (sentence.StartsWith("This"))
	{
	    Console.WriteLine("Yes sentence begins with This");
	}
Topics:

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

{{ parent.tldr }}

{{ parent.urlSource.name }}