Coffeehouse Post

Single Post Permalink

View Thread: .Net versioning question
  • User profile image
    cbae

    , BitFlipper wrote

    @cbae: I don't think this could work because what about the types? While they are identical in each case, due to .Net being strictly typed, Api10.ClassA is not the same as Api20.ClassA.

    That's why you have wrapper classes. Each wrapper class knows which specific API method to call. You use the wrapper classes to give you a common interface method to call in order to generalize the routine that does the Dictionary lookups.

    That is if you don't want to simply change each of the Api classes to implement a common interface to begin with.