When I open a file using this code
if (ofd.ShowDialog() == DialogResult.OK) text = File.ReadAllText(ofd.FileName, Encoding.Default);
A window will appear and ask me to select a file (the file name is empty, as you can see in the image)

If I press the "Open" button a second time to open the file, the file name will display the path to the previous selected file (see image). How can I clear this path every time he clicks the open button?

a1204773
source share