Well, yes. It will be only the last entry.
You open it for append (using
fHandler
) then close that and re-open it with a StreamWriter - which destroys any existing content.
Replace your entire method with:
public void Insert(string name, string DT, int scope)
{
using (StreamWriter sw = File.AppendText("c:\\SymbolTable.txt"))
{
sw.WriteLine(name + "," + DT + "," + scope);
}
}