How to cleare all Texts To txt File using Vb.Net ?

Shahab a 241 Reputation points

Hello Everyone

I want to Cleare all Text and then write a new one in User.txt File
i used this codes
But it doesn't work properly
Please help my
Thanks all


An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,608 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 113.1K Reputation points

    Use False instead of True if you want to clear the file before writing a new text. (You can remove the lines 3, 4 and 5).

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Shahab a 241 Reputation points

    thanks dear for your help

    0 comments No comments