Check if a String Contains a Phrase

The following snippet will allow you quickly determine whether or not a specified phrase exists in a string:

If (!String.IsNullOrEmpty(STRINGTOCHECK.ToString()) && STRINGTOCHECK.ToString().ToLower().Contains("PHRASETOSEARCHFOR")){//Found}Else{//Not Found}
Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts