我有一堂课:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace OrderManagementv1
{
public class info
{
public string startPickTicket { get; set;}
public string endPickTicket { get; set;}
public string ordFile { get; set;}
public int ordStartPage { get; set;}
public int ordEndPage { get; set;}
public string bolFile { get; set;}
public int bolStartPage { get; set;}
public int bolEndPage { get; set;}
public string pickFile { get; set;}
public int pickEndPage { get; set;}
public string invFile { get; set;}
public int invEndPage { get; set;}
public info()
{
}
}
}
之后我执行以下操作:
info i = new info();
i.startPickTicket = dataGridView2.CurrentRow.Cells[dataGridView2.SelectedCells[0].ColumnIndex].Value.ToString();
我收到以下错误:
你调用的对象是空的。
几个小时以来,我一直试图弄清楚这一点。也许它真的很简单。我不明白。请帮忙谢谢