Remove duplicate mailboxes

Source: Internet
Author: User

There is a lot of duplicate data in notepad, as shown below:

99999@126.com

111111@126.com

22222@126.com

99999@126.com

111111@126.com

99999@126.com

99999@126.com

22222@126.com

99999@126.com

111111@126.com

99999@126.com

111111@126.com

99999@126.com

At first glance, we can see that there are three duplicate data records. My problem is how to filter the data, with only three records left.

Note that there are a lot of actual data, and the format is the same as above. Each row has a mailbox address. The data duplication location is not fixed.

I use C #,

No database required, key to writingCodeYou can.

Solution: Use the contains method of list. If this element is not included, add it to list.

Source code: Http://codemo.qjwm.com/down_3354376.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.