Posted on 2012-08-28
I have two classes. One called Security and another called Calculation.
The class Calculation inherits from the Security class. The Security class contains a public type of List<Prices>. When the Security Class is intialised the List<Prices> type is populated, lets say with a 100 elements. It also creates a Calcualtion object and then calls a method in the Calculation class.
My question is the Calculation class can see the public field type of List<Prices> but when stepping through the code the List<Prices> is empty and not conatining the 100 elements that it should be?
I know it is possible to pass the List<Prices> as a parameter to the method in the Calculation Class but I am trying to learn about inheritance.
Thanks for any help,