Tech Off Post

Single Post Permalink

View Thread: Generic Base class problem
  • User profile image
    ilya

    Hey JoshB,

    Generics are awsome, but they can cause you some grief if you don't watch out.

    One way you can take care of this problem is to hide the implementation of your Customer class that returns the IList<Customer> and simply create a new IList<SpecialCustomer> and basically create instances of SpecialCustomer from the Customer objects that you would get from base.

    Hope that helps.