这是我的班级人数
public class pax
{
public pax();
[SoapElement(DataType = "integer")]
public string age { get; set; }
public string firstName { get; set; }
public string lastName { get; set; }
public string paxType { get; set; }
public string title { get; set; }
}
我已经声明了以下数组
pax[][]rooms=new pax[3][];
rooms[0][0].paxType = "Adult";
rooms[0][1].paxType="Adult";
rooms[0][2].paxType="Child";
rooms[0][2].age = "6";
它抛出错误对象引用未设置为对象的实例。在线的
rooms[0][0].paxType = "Adult";