Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Protected and Public and Private 3P's
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00951743
Message ID:
00951786
Views:
5
You got it. Now occasionally, I've needed to access a protected method. Not sure if this is where you're going but...

If you do, then what I've done (rather that change the visibility...cuz unless you have the source code you can't) is to create a subclass(B) of the class(A) that contains the protected method. Then add a public method to the subclass(B) that calls the protected method defined in class(A). Then you can use subclass(B) instead of class(A) and be able to call the protected class(A) method by calling the the public subclass(B) method.

Scott
Previous
Reply
Map
View

Click here to load this message in the networking platform