List<BillOfLading> bolList = new List<BillOfLading>();
protected void Button1_Click(object sender, EventArgs e)
{
BillOfLading newBol = new BillOfLading("AXSY1414114");
bolList.Add(newBol);
newBol.BillOfLadingNumber = "CRXY99991231";
bolList.Add(newBol);
}
I was expecting that bolList
would container two different objects or values, but it appears that this simple code doesn't work. Any ideas?
Resulting Immediates:
bolList
Count = 2
[0]: {kTracker.BillOfLading}
[1]: {kTracker.BillOfLading}
bolList[0]
{kTracker.BillOfLading}
_billOfLadingNumber: "CRXY99991231"
BillOfLadingNumber: "CRXY99991231"
bolList[1]
{kTracker.BillOfLading}
_billOfLadingNumber: "CRXY99991231"
BillOfLadingNumber: "CRXY99991231"
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…