Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6027475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:35:55+00:00 2026-05-23T04:35:55+00:00

I have a DataTable which I get by an upload of CSV document from

  • 0

I have a DataTable which I get by an upload of CSV document from the user and has columns, rows like that:

Email      Age      Team
x@x.com    25       BarcelonaFC
y@y.com    32       BesiktasJK
z@z.com    18       Napoli
y@y.com    19       Boca Juniors
x@x.com    36       Internazionale

I need to filter that datatable before I insert it into the database. Email column should be unique. So I need to filter that datatable so that I get as a result eliminating 2 rows. I do not want to use LINQ, but if it is only solution, its ok.

Email      Age      Team
x@x.com    25       BarcelonaFC
y@y.com    32       BesiktasJK
z@z.com    18       Napoli
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T04:35:56+00:00Added an answer on May 23, 2026 at 4:35 am

    You can create a HashSet<string> holding email addresses, then loop backwards through the table, add the email address for each row to the hashset, and, if it’s already there (if Add returns false), remove the row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a DataTable which has some rows and I am using the select
In C#/ASP.NET 3.5, I have a DataTable which pulls rows from the database. I
I've a datatable which has a single text column 'Title' which can have multiple
I Loaded Data From Datatable to DatagridView which look like this: SerialNumber1 | Quantity
In my aspx page I have a HTML inputfile type which allows user to
I have a DataTable which is bound to datagridview (Winforms)... I use the following
I am connecting C# with Oracle 11g. I have a DataTable which i fill
I have a datatable which contains following data as SrNo Roll Name 1 1
I have a datatable which is bound to a DataGridView in my C# winforms
I have a compoment which has a method-signature attribute. It can be activated, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.