Hi,
I have a list with two orders
order 1 - item 1,item2,item 3
order 2 - item 2,item 3, item 4
how to remove only item 3 from order 2 of list
Thanks
Hi,
I have a list with two orders
order 1 - item 1,item2,item 3
order 2 - item 2,item 3, item 4
how to remove only item 3 from order 2 of list
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Sachin SinghRank #66 · 26.2K reputationPosted Nov 27, 2022, 3:00 AM EST
If you are compaing List then use below
var ordertwoDistict=OrderTwoList.Except(OrderOneList);If you are comparing two Complex type then use below
Aravind GovindarajRank #430 · 5.8K reputationPosted Nov 27, 2022, 5:22 AM EST
please follow steps to do generic soln.
var removalItem(s);
For loop Order
{
Mention the removal item in removalItem collection;
if removalItem is null or empty {
return order;
else
return order.item.except(removalItem);
}