Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting to Properties in derived class from base
Message
 
To
01/11/2010 13:22:17
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01487780
Message ID:
01487790
Views:
42
>Hi all,
>
>If I have a base class, and App level class, and several inherited classes but have added a property in the App Level classe, how can I get to it from the base? I have a reference to the class in the base
>

Reflection, like Viv showed. Or create a simple interface that has this property in it, then make your inherited classes inherit from this interface as well. Then just cast the reference you're holding to that interface and (if it's not null) you can access the property.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform