@ankit goel , Welcome to Microsoft Q&A,
I make some changes in my code.
Here is a code example you could refer to.
var result1 = listnew.Select(m => m[0]).ToList();
var result = result1.Except(list);
listnew.RemoveAll(m => result.Contains(m[0]));
for (int i = 0; i < list.Count; i++)
{
if (!result1.Contains(list[i]))
{
listnew.Add(new object[] { list[i],0 });
}
}
foreach (var item in listnew)
{
Console.WriteLine(item[0] + "**" +item[1]);
}
Tested result:
Hope this could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.