Split method with a string value in c#

As you know a normal split method is accepting only a character . It will throw an error when we give a string to split. This code shows you how you can use split method to split a string by a string in c#.
  1. string myQuery="select * from tblAccount where id=1"  
  2. List<string> queryList = myQuery.Split(new string[] { "where" }, StringSplitOptions.None).ToList(); 
The queryList  will give you the list after split
 
Kindest Regards

Sibeesh
http://sibeeshpassion.com/