P
P
Platon Stepanov2020-05-16 13:06:34
C++ / C#
Platon Stepanov, 2020-05-16 13:06:34

C# Unity How to clear a text file(.txt)?

I write to the log file like this. You need to clear it when you start the program again. I did not find how to do it. Log is the path to the file.

File.AppendAllText(Log, DateTime.Now + ": " + Message);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#, 2020-05-16
@StepanovPlaton

https://docs.microsoft.com/en-us/dotnet/api/system...
https://docs.microsoft.com/en-us/dotnet/api/system...
https://docs. microsoft.com/en-us/dotnet/api/system...
it's not sequential but optional

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question