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 6749949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:45:03+00:00 2026-05-26T12:45:03+00:00

i got a generic list that looks like this: List<PicInfo> pi = new List<PicInfo>();

  • 0

i got a generic list that looks like this:

List<PicInfo> pi = new List<PicInfo>();

PicInfo is a class that looks like this:

[ProtoContract]
public class PicInfo
{
        [ProtoMember(1)]
        public string fileName { get; set; }
        [ProtoMember(2)]
        public string completeFileName { get; set; }
        [ProtoMember(3)]
        public string filePath { get; set; }
        [ProtoMember(4)]
        public byte[] hashValue { get; set; }

        public PicInfo() { } 
}

what i’m trying to do is:

  • first, filter the list with duplicate file names and return the duplicate objects;
  • than, filter the returned list with duplicate hash value’s;

i can only find examples on how to do this which return anonymous types. but i need it to be a generic list.

if someone can help me out, I’d appreciate it. also please explain your code. it’s a learning process for me.

thanks in advance!

[EDIT]

the generic list contains a list of objects. these objects are pictures. every picture has a file name, hash value (and some more data which is irrelevant at this point). some pictures have the same name (duplicate file names). and i want to get a list of the duplicate file names from this generic list ‘pi’.

But those pictures also have a hash value. from the file names that are identical, i want another list of those identical files names that also have identical hash values.

[/EDIT]

  • 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-26T12:45:04+00:00Added an answer on May 26, 2026 at 12:45 pm

    I think, you have to use SequenceEqual method for finding dublicate
    (http://msdn.microsoft.com/ru-ru/library/bb348567.aspx).
    For filter use

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

Sidebar

Related Questions

Let's say we've got a generic list like this: List<string> list = new List<string>()
I've got a class like this: Public NotInheritable Class F Private Sub New() End
I've got a class with many string arrays. I'd like to have one generic
I've got a static class (DataFormSubject) that holds a generic List object, as follows:
I've got a generic class: public class BaseFieldValue<T> { public BaseFieldValue() { //... }
Basically what I mean is like this: List<String[]> routes = (List<String[]>)application.getAttribute(routes); For the above
Ive just seen a piece of code that uses a generic list class to
Say I've got this interface: public interface IFoo { string Text {get;} } And
I've got a search function that on completion, stores data in a generic list
I have a Generic list of a class that I automatically convert it to

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.