cant see sub class properties with base class List

aronmatthew

Well-known member
Joined
Aug 5, 2019
Messages
76
Programming Experience
Beginner
for some reason I cant view properties while debugging using sub class with base class List
1748109912812.png
1748109952947.png
 
Child classes can only see protected, public, or internal members of the ancestors classes.
 
Look closely. You declared id as private.

In the future, please post code as text in code tags, not as a screenshot.
 
Are you saying, without actually saying, that you created a List<_temp1> object and you're expecting to see properties of a _temp object? If not, what are you saying? How about you provide a FULL and CLEAR explanation of the problem and provide that actually demonstrates it?
 
Are you saying, without actually saying, that you created a List<_temp1> object and you're expecting to see properties of a _temp object? If not, what are you saying? How about you provide a FULL and CLEAR explanation of the problem and provide that actually demonstrates it?

While debugging I cannot see public property Id in the class object
 
So it looks like I am going to have to add an index operator, Count property, and inherit from iEnumerable to solve this one but the class view in debuger should show all properties for sub class on top of inheritance from iCollection
 
While debugging I cannot see public property Id in the class object

Does that one sentence really qualify as "FULL and CLEAR"? We want to help but if you're not going to try to help us do so, we can't. Your second screenshot shows a variable named temp but your picture of your code shows no such variable. If it's too much trouble for you to provide all the relevant information, you're wasting the time you do spend providing half the story because it's not enough for us to help you.
 
Does that one sentence really qualify as "FULL and CLEAR"? We want to help but if you're not going to try to help us do so, we can't. Your second screenshot shows a variable named temp but your picture of your code shows no such variable. If it's too much trouble for you to provide all the relevant information, you're wasting the time you do spend providing half the story because it's not enough for us to help you.

Since when did this all of the sudden become a problem with inheritance? The need to use a Enumerator List along with a List field is junk. Especially when generic implementation of such is wash from my end
 
I have no idea what you're talking about and I'm not interested in trying to work it out any further. If you had provided a demonstration of what you were doing and an explanation of what happened, we could do the same and see whether we experienced the same behaviour. If we had then we'd probably be able to work out why and if we hadn't then we'd know there was a specific issue at your end. As it is, we have no idea and now everyone has wasted their time when you could have just asked a question properly in the first place.
 
Back
Top Bottom