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
Post a Comment