C#中如何实现把泛型集合dictionary<k,v>的数据绑定到listview控件中
Dictionary<string,Vehicle>vehicle=newDictionary<string,Vehicle>();Vehicleve1=newVehic...
Dictionary<string, Vehicle> vehicle = new Dictionary<string, Vehicle>();
Vehicle ve1 = new Vehicle("奥D1", "东风", "蓝色", 3, 111, null, 20);
Vehicle ve2 = new Vehicle("金D1", "东风", "蓝色", 3, 240, null, 33);
Vehicle ve3 = new Vehicle("沪R6", "宝马", "白色", 3, 240, null, 11);
vehicle.Add(ve1.LicenseNo, ve1);
vehicle.Add(ve2.LicenseNo, ve2);
vehicle.Add(ve3.LicenseNo, ve3);
//Load事件里绑定在ListView中
、、、、、、、、、、、、、 展开
Vehicle ve1 = new Vehicle("奥D1", "东风", "蓝色", 3, 111, null, 20);
Vehicle ve2 = new Vehicle("金D1", "东风", "蓝色", 3, 240, null, 33);
Vehicle ve3 = new Vehicle("沪R6", "宝马", "白色", 3, 240, null, 11);
vehicle.Add(ve1.LicenseNo, ve1);
vehicle.Add(ve2.LicenseNo, ve2);
vehicle.Add(ve3.LicenseNo, ve3);
//Load事件里绑定在ListView中
、、、、、、、、、、、、、 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询