I'm pretty sure that I need to use Directory.Exists()
but it always return false in this case.
If (!Directory.Exists(path))
What I trying to achieve is that it will enter the loop only if a network drive is not mapped to the computer. What I tried to do is to check if a path of network drive is already exists and if not -> it will map it. if yes -> he should not enter the if statment. However, it always return false and because of the !
operator enter to the if statement and do the mapping. I guess that Im not doing best with this path... and I should use the Directory.Exists()
but I have no idea how to fix it. Any suggestions please?
Aucun commentaire:
Enregistrer un commentaire