【发布时间】:2012-06-25 21:03:28
【问题描述】:
public List<string> myitems { get; set; }
//Store All unique ID of this date in a list
public void myitem(string Index)
{
myitems.Add(Index);
}
if (temp.Start == received)
{
scheduledItem scheduleditem = new scheduledItem(temp.Name, "1pm", "true");
DataCollection.Add(scheduleditem);
myitem(temp.UniqueID.ToString());
}
else
{
MessageBox.Show("Nothing");
}
知道 myitems.add(index) 出了什么问题; ?
【问题讨论】:
-
new List<string>在哪里?它将解释null(“缺少对象”)..