I have a class called Customer
that has several string properties like
firstName, lastName, email, etc.
I read in the customer information from a csv
file that creates an array of the class:
Customer[] customers
I need to remove the duplicate customers having the same email address, leaving only 1 customer record for each particular email address.
I have done this using 2 loops but it takes nearly 5 minutes as there are usually 50,000+ customer records. Once I am done removing the duplicates, I need to write the customer information to another csv file (no help needed here).
If I did a Distinct
in a loop how would I remove the other string variables that are a part of the class for that particular customer as well?
Thanks, Andrew