I defined a class:
public class Sample{
public string name {get;set;}
public int price {get;set}
}
Then
Sample sampleA = new Sample();
sampleA.name = "test";
Sample sampleB = new Sample();
sampleB.price = 100;
I do this because I will save JSONed sampleA and JSONed sampleB to Azure table, to present a full sample object. In other code, sometime only need name, sometime only need price, so I only need to pull data that needed each time. Of course in real code, the structure of the sample is much much more complex.
My question is:, is there any easy method that can do:
Sample sampleC = sampleA + sampleB;
and sampleC should contain:
sampleC.name = "test";
sampleC.price = 100;