Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inherited property does not set to itself
Message
De
22/01/2005 16:35:04
 
 
À
22/01/2005 15:57:30
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
00979501
Message ID:
00979676
Vues:
11
I wonder if it would work if you made the shadowed field in your sub-class public.
Public Shadows cLogin As String = "Login"
Just a guess ... I really have no clue. Couldn't hurt to try it though. =)

~~Bonnie



>>OK, I get it now. I think what you'll need to do is pass a parameter to your CheckLogin() function. Then it would work the way you want it to. I don't know if this the best way to solve this problem, as I said, I've never used shadowing, but I'm pretty sure it will accomplish what you need.
>
>No, this is not what I want. But, here is more information I just found. The problem relies at the declaration level of the derived class. If I don't have any declaration in there and just put cLogin="Login" just before calling CheckLogin(), the value is visible in the class. However, I don't want to initialize cLogin in a method as I need it defined at the declaration level of the derived class so it will be visible in the entire derived class.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform