Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. populate dictionary from the intersection of two list collections

populate dictionary from the intersection of two list collections

Scheduled Pinned Locked Moved LINQ
tutorial
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    siva455
    wrote on last edited by
    #1

    Hi, I have a list like List> X where Items is a class... and another List like List Y where StudentTasks is a class which contains two variables PersonnelNumber(int),Iseligible(bool)....... In the above list X contains personnelnumber(int) which is the key for each list member in X... In the above list Y contains personnelnumber(int) which is one of the variable in each list member (ie StudentTasks )... actually the personnelnumbers in X were the subset of personnelnumbers present in Y which even contains personnal numbers other than in X....So as now Please let me knoiw how to fetch personnelnumbers from Y(which were present in X) and the associated Iseligible values from Y... and need to create a new Dictionary like var q=new Dictionary() where this should be populated with values from the above resultset...ie...key as personnelnumbers and iseligible as value....

    D L 2 Replies Last reply
    0
    • S siva455

      Hi, I have a list like List> X where Items is a class... and another List like List Y where StudentTasks is a class which contains two variables PersonnelNumber(int),Iseligible(bool)....... In the above list X contains personnelnumber(int) which is the key for each list member in X... In the above list Y contains personnelnumber(int) which is one of the variable in each list member (ie StudentTasks )... actually the personnelnumbers in X were the subset of personnelnumbers present in Y which even contains personnal numbers other than in X....So as now Please let me knoiw how to fetch personnelnumbers from Y(which were present in X) and the associated Iseligible values from Y... and need to create a new Dictionary like var q=new Dictionary() where this should be populated with values from the above resultset...ie...key as personnelnumbers and iseligible as value....

      D Offline
      D Offline
      Dean Oliver
      wrote on last edited by
      #2

      Hi could you please supply the source code of the collections. thanks

      1 Reply Last reply
      0
      • S siva455

        Hi, I have a list like List> X where Items is a class... and another List like List Y where StudentTasks is a class which contains two variables PersonnelNumber(int),Iseligible(bool)....... In the above list X contains personnelnumber(int) which is the key for each list member in X... In the above list Y contains personnelnumber(int) which is one of the variable in each list member (ie StudentTasks )... actually the personnelnumbers in X were the subset of personnelnumbers present in Y which even contains personnal numbers other than in X....So as now Please let me knoiw how to fetch personnelnumbers from Y(which were present in X) and the associated Iseligible values from Y... and need to create a new Dictionary like var q=new Dictionary() where this should be populated with values from the above resultset...ie...key as personnelnumbers and iseligible as value....

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Please give us sample code to work out.

        Peace ON In Simple Sense... Start Shining Stories We Live...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups