OpenFileDialog C #, allows the user to enter a file name?

I use OpenFileDialogso the user can select the file.

However, I also want the user to be able to enter a file name in the field that contains the file name and create this file if it does not exist ....

Right now, if I type the file name and click on the "Open" button, it says that the file does not exist ...

Is it possible to do this with OpenFileDialog? thank

+3
source share
2 answers

create this file if it does not exist

Sounds like you need to use SaveFileDialog.

+3
source

Before displaying the dialog, make sure that you have installed OpenFileDialog.CheckFileExists = falseand .CheckPathExists = false.

+5
source

Source: https://habr.com/ru/post/1793644/


All Articles