1 alist = new List<ChartMetaData>(); 2 blist = new List<ChartMetaData>(); 3 clist = new List<ChartMetaData>(); 4 dlist = new List<ChartMetaData>(); 5 6 for (DateTime bDateTime = beginDatetime; bDateTime < endDatetime; bDateTime = bDateTime.AddMinutes(Convert.ToDouble(timeInterval))) 7 { 8 tempData = new ChartMetaData(); 9 tempData.GetDate = bDateTime; 10 if (Aitem=="1") 11 alist.Add(tempData); 12 if (Bitem == "1") 13 blist.Add(tempData); 14 listCount++; 15 } 16 17 18 onlinePowerList = createPower.GetList(seeid, beginDatetime, endDatetime); 19 if (onlinePowerList.Count > 0) 20 { 21 double[] pe = createWarnSet.GetBestValue(seeid, WarningType.P); 22 double[] zpe = createWarnSet.GetBestValue(seeid, WarningType.ZP); 23 24 ct = createSee.GetCt(seeid); 25 pt = createSee.GetPt(seeid); 26 foreach (OnlinePower model in onlinePowerList) 27 { 28 for (int i = 0; i < listCount; i++) 29 { 30 if (Aitem == "1" && alist[i].GetDate==model.GetTime) 31 { 32 alist[i].Value = model.PA * ct * pt; 33 alist[i].StrValue = alist[i].Value.ToString(); 34 alist[i].MaxValue = pe[1]; 35 alist[i].MinValue = pe[2]; 36 } 37 38 if (Bitem == "1" && blist[i].GetDate == model.GetTime) 39 { 40 blist[i].Value = model.PB * ct * pt; 41 blist[i].StrValue = blist[i].Value.ToString(); 42 blist[i].MaxValue = pe[1]; 43 blist[i].MinValue = pe[2]; 44 } 45 46 } 47 } 48 }
调试时 当调试到alist[i].Value被赋值为155时,监视一下下面的blist[i].Value值也会等于155 调试到下面给 blist[i].Value赋值为140时,监视一下上面的alist[i].Value的值也跟着变成了140,这个是什么情况,求高手帮忙
繁花如伊