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 HadiyaRank #358 · 7K reputationPosted Apr 20, 2021, 10:32 PM EDT
peterRank #5,346 · 302 reputationPosted Apr 21, 2021, 3:28 PM EDT
Yogeshkumar HadiyaRank #358 · 7K reputationPosted Apr 22, 2021, 12:21 AM EDT
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.
peterRank #5,346 · 302 reputationPosted Apr 22, 2021, 3:37 PM EDT
Kiran MohantyRank #821 · 2.8K reputationPosted May 24, 2021, 9:39 AM EDT
peterRank #5,346 · 302 reputationPosted May 25, 2021, 2:06 PM EDT