It seems like you have mixed up ReadAllText and ReadAllLines.
You can use either or, but the in first case you get all text in one string and cannot perform a foreach loop on string level. ReadAllLines on the other hand will return an array of strings, one string for each line in the file.
If the file is relatively small you can use ReadAllText and do the search and replace on the single string like
string inputText = File.ReadAllText(@"C:\temp\ArcId.txt");
string outputText = inputText.Replace("Toolbar()", "Toolbar");
File.WriteAllText(@"C:\temp\IDs.txt", outputText);
Not sure that this replacement is exactly what you want to do, but you didn't give that information.
You can also read line by line:
StringBuilder outputText = new StringBuilder();
foreach (string line in File.ReadAllLines(@"C:\temp\ArcId.txt"))
{
outputText.Append(line.Replace("Toolbar()", "Toolbar"));
}
File.WriteAllText(@"C:\temp\IDs.txt", outputText.ToString());