public static void Main()
string str="remove the sub-string";
string MainString="This is the main string and I want to remove the sub-string";
string resultatntString = MainString.Replace(str, " ");
Console.WriteLine("Using Replace :{0}",resultatntString);
Console.WriteLine("Using Substring :{0}",MainString.Substring(0,MainString.IndexOf(str)));
Console.WriteLine("Using Remove :{0}",MainString.Remove(MainString.IndexOf(str)));