I am saving data to a file-name using Stream writer but if i run the code for second time the same data is appended to the previous data but i would like to clear the old data a
Second parameter here: new StreamWriter(StrFilePath,true) is set to true, which means append to file. Set that parameter to false and it will work.
new StreamWriter(StrFilePath,true)