我有一个ArrayList
...
while (reader.Read())
{
decimal nr_zbor = reader.GetDecimal(cod_zbor);
string airport = reader.GetString(name_aeroport);
string company = reader.GetString(name_company);
list.Add(nr_zbor);
list.Add(airport);
list.Add(company);
}
...
我希望放入 ListView 列[zbor,机场,公司],但我现在不知道如何
fly = searchFly.GetFly(direction, country, theDate, DFlexible);
你能帮我吗?
最佳答案
一个选择是创建一个具有这 3 个属性的类
class nac
{
public decimal nr_zbor ...
public string airport ...
public string company ...
}
List<nac> nacs = new List<nac>();
这些属性是列
关于c# - 如何在c#中将ArrayList添加到listview1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12654864/