The signature of the StreamWriter constructor is as follows:
public StreamWriter(string path,bool append )
So change your code:
System.IO.StreamWriter(ALPHAVAL, True)
to:
System.IO.StreamWriter(ALPHAVAL, False)
This tells StreamWriter to overwrite the file.
source
share