i basically want to define a templet data object , and use this templet data object to assign new data objects. then put different values to new data objects.
code like:
public class sData
{
public string name;
public int Number;
public sData(string name,int Number)
{
this.poster_path = path;
this.Number = Number;
}
}
sData templet= new sData("aaaa","0");
sData realData1 = new sData();
realData1=templet;
realData1.Number=100;
but after realData1.Number=100;
i found the templet.Number
is changed to 100
how can i just give the 100
to realData1
, but no the templet
?