string s = "abc";//string to be searched //'line' is the storing the line which is read if(line.Contains(s)) { //action to be performed }