Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB and Namespaces Arggg
Message
De
06/03/2008 13:25:15
 
 
À
06/03/2008 09:49:40
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01298281
Message ID:
01299388
Vues:
20
>Hi Viv,
>
>> Snip ***
>>>I also find another issue that you are mention above. For instance if I do an import of:
>>>Import MyName.MyProjectA
>>>Import MyName.MyProjectB
>>>
>>>And then both of those projects have a class named Enums it becomes ambiguous when I try to reference it in code. I am apparently not allowed to use the full qualified name such as MyName.MyProjectA.Enums.ErrorLevel = since the Import is there. How do I use an alias in the import? Would that get around this?
>>
>>Imports EnumsA = MyName.MyProjectA.Enums
>>Imports EnumsB = MyName.MyProjectB.Enums
>>'Then refer as:
>>EnumsA.ErrorLevel
>>EnumsB.xxx
>>
>>Update: I also don't understand why you have any problem using a fully qualified namespace - that should *always* be available (assuming the project has a reference in the first place)
>>
>
>If I add this I get an error on the line
>
>Imports MyName.MyProjectA
>
>' Causes an error with the first part underlined
>errorLevel = MyName.MyProjectA.Enums.ErrorLevel.Informational
>' No error if I remove the part which is imported
>errorLevel = Enums.ErrorLevel.Informational

They are not additions - they are replacements.
Regards,
Viv
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform