Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird behavior with Imports System.IO
Message
De
23/08/2005 10:43:54
 
 
À
23/08/2005 09:59:05
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01042897
Message ID:
01042934
Vues:
22
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

    ' Create a directory
    ' expC1 Directory
    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?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform