>Yeah, I took another look at that error message. I think that the function declaration is implicitly overloading another Directory function in the same namespace. The other Directory function accepts a single string paramter, and therefore the CLR does not know which function to call. Usually the error message associated with overloading a function with the same argument
list is more descriptive. This error message may have something to do with the Shared declaration.
It is correct. There is a function a few lines above named Directory to check if a directory exist. That explains why putting only IO in front was making it work as well because it was referenced. But, only the name was not enough in this case because a function of that name exists in the same file.