Hi,
What's the error? Any other Imports? 'Directory' occurs in more than one namespace so could be ambiguous. Adding Imports 'System.IO.FileInfo' would, for example give you an error.
HTH,
Viv
>I have a weird behavior with the use of Imports System.IO.
>
>I have the following code in File.vb:
>
>
Imports System.IO
Imports System.Text
Public Class FileFunction
Public Shared Function MD(ByVal tcDirectory As String)
Directory.CreateDirectory(tcDirectory)
End Function
End Class
>
>The Directory line in the MD() function is with error. Basically, the processor can't find the Directory reference. However, the proper imports has been done at the top. If I put the full reference such as:
>
>
> System.IO.Directory.CreateDirectory(tcDirectory)
>
>
>It will work.
>
>Anyone can explain that to me?