I have the list of objects of the following class,
class Invoice
{
public int InvoiceNumber;
public string CustomerName;
public bool IsDupe;
}
The invoice numbers can be duplicate or there can even be a case of 4 invoices , all with the same number.
I need to set the IsDupe flag on all except one of the invoice object. One approach is the brute force method of having a list of invoice numbers and comparing each one to flag. I have also tried this question . Is there any better syntactical way to do it ? TIA