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

  • SEARCH
  • Home
  • 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 7935267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:52:03+00:00 2026-06-03T21:52:03+00:00

I have a in-memory DataTable and I need to mark the duplicates ….. for

  • 0

I have a in-memory DataTable and I need to mark the duplicates ….. for example ..

From
enter image description here
To
enter image description here

I would probably do something like ..

    For each dtrow in dt.rows
    If dtrow("Country") Is one of Duplicates then
            dtrow("Country") += "*"
    end if
    Next

Sorry for asking so many questions … My head is burnt .. nothing came out .. and this project is needing to finish very soon ..

  • 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-06-03T21:52:04+00:00Added an answer on June 3, 2026 at 9:52 pm

    You could use LINQ-to-DataTable:

    Dim dups = From row In dt.AsEnumerable()
               Let country = row.Field(Of String)("Country")
               Group row By country Into DupCountries = Group
               Where DupCountries.Count() > 1
               Select DupCountries
    For Each dupCountryRows In dups
        For Each row In dupCountryRows
            row("Country") = row.Field(Of String)("Country") & "*"
        Next
    Next
    

    Or with C# syntax:

    var dups = from row in dt.AsEnumerable()
               let id = row.Field<string>("Country")
               group row by country
               into DupCountries where DupCountries.Count() > 1
               select DupCountries;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a on memory Datatable like this. I want to produce xml file
I have a DataTable in memory that I need to dump straight into a
I have a datatable which i get from the databasemanager class, and i would
I have a datatable in memory that I got from a non SQL source.
Ignoring unsafe code, .NET cannot have memory leaks. I've read this endlessly from many
We have an in memory DataTable in a CLR procedure. After significant processing the
Suppose I have a small database represented in memory as a DataTable, what is
I'd like to use a memory profiler to determine if I have memory links
I have memory problems with the webapp responsible from parsing XML event and pushing
I have a DataTable which is populated from a CSV file then, using a

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.