Essentially I have to use a poorly implemented web service maintained by other programmers. They have two classes that don't derive from a parent class, but have the same properties (Ughh...). So it looks like this in my web service proxy class file:
public partial class Product1
{
public int Quantity;
public int Price;
}
public partial class Product2
{
public int Quantity;
public int Price;
}
So what's the best way to grab the values from known properties without duplicating the code? I know I probably could use reflection, but that can get ugly. If there is an easier less crazier way to do it (maybe in the new c# features?) please let me know.