c# - Check if folder exists does not work as expected -


when attempt check if folder exists, code suggests exists, if doesn't.

string folder = @"c:\lwa"; if (!directory.exists(folder)) {     messagebox.show("folder exists"); }   

what's wrong it?

your if condition , message don't match.

! directory.exists(blah) 

will true if directory blah not exist.

the ! operator inverts boolean value give it.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

python - Django-cities exits with "killed" -

python - How to get a widget position inside it's layout in Kivy? -