How to determine if a String instance starts with a specific string

StartsWith() to determine whether the beginning of a string matches
some specified string.

The method contains 3 overloads which also contains options to ignore
case while checking the string.

Example
if (str.StartsWith("Hello",StringComparison.CurrentCultureIgnoreCase))
MessageBox.Show("true");

0 comments: