Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inherited property does not set to itself
Message
From
22/01/2005 16:35:04
 
 
To
22/01/2005 15:57:30
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
00979501
Message ID:
00979676
Views:
10
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform