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 -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -