I have the two following lists of different objects that are being filled with different values:
page.Invoice.InvoiceDet = page.UcDetail.InvoiceItems;
page.Invoice.InvoiceTax = page.UcTax.InvoiceItems;
In InvoiceDet i have a property called TaxCodeDesc that brings the description of a Tax Code, in InvoiceTax i have the same property but is null in all the items. Both lists have the same TaxCode so i want to use this value to compare and fill InvoiceTax with TaxCodeDesc
This is what i've tried.
page.UcDetail.InvoiceItems.ForEach(x => x.TaxCodeDesc = page.UcTax.InvoiceItems[0].TaxCodeDesc);
I appreciate any responses. Thanks