Casting a interface derived class to another derived class
问题 I am trying to accomplish a way to cast a given object that is derived from an interface to a different type that is also derived from the same interface. This to prevent having to completely rebuild the object. interface IItem { } class FryingPan : IItem { } class CookingPan : IItem { } But here is the catch, I don't 'know' what type I am casting to. I only know by a type variable. This is set from a combobox. Type SelectedItem { get; set; } Can this be done ( preferably without having to