I want to return another List from two collections as shown. The task is to combine the two on VendorID and calculate a new price. The lists are not static and can enlarge in size.
IList
new Product() { VendorID = 1, Email = "John@yahoo", Price = 130,Name ="john" },
new Product() { VendorID = 1, Email = "john@yahoo", Price = 210,Name="john" },
new Product() { VendorID = 2, Email = "Bill@yahoo", Price = 180,Name ="Bill" },
new Product() { VendorID = 3, Email = "Ram@yahoo" , Price = 200,Name="Ram" }
};
IList
new Funds(){ VendorID = 1, Funds=30},
new Funds(){ VendorID = 2, Funds=40}
};
Result: Vendor Email Price
1 John@yahoo 310 (ie 340-30)
2 Bill@yahoo 140 (ie 180-40)
3 Ram@yahoo 200
Yogeshkumar HadiyaPosted Apr 21, 2021, 2:32 AM
peterPosted May 25, 2021, 6:06 PM
Kiran MohantyPosted May 24, 2021, 1:39 PM
peterPosted Apr 22, 2021, 7:37 PM
Yogeshkumar HadiyaPosted Apr 22, 2021, 4:21 AM
Hi if you solve problem with my answer i request you to please mark as accepted. And below code you need in VB or in C# please clarify.
peterPosted Apr 21, 2021, 7:28 PM