Coffeehouse Post

Single Post Permalink

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

    It is sounding more like your faced with a bigger problem.  To expand your original example, something like this

    if (version == 1)
        AArray=InstanceOfSomeApi10.GetSomething(AnInt,AString);
        AObjectModelCollection=new ObjectModel.Collection(AArray)
    else
        AObjectModelCollection = InstanceOfSomeApi20.GetSomething(ADouble,AInt,AString);
    
    //Do stuff with AObjectModelCollection in common code from this point forward.

     

    I.E. the web service method call isn't just an interchangable thing.  Not sure how to do better than what you already are.