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. C#
  4. Linq with Link List

Linq with Link List

Scheduled Pinned Locked Moved C#
csharplinqalgorithmsquestion
5 Posts 3 Posters 0 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.
  • K Offline
    K Offline
    Khaniya
    wrote on last edited by
    #1

    Hi, I am having custome Link List object. Which manages nodes and searching using while loop (node.next()). I am new to Linq Is Linq can be used with my Link List object to avoid loops? :doh: Thanks Regards Khaniya Sunil

    C 1 Reply Last reply
    0
    • K Khaniya

      Hi, I am having custome Link List object. Which manages nodes and searching using while loop (node.next()). I am new to Linq Is Linq can be used with my Link List object to avoid loops? :doh: Thanks Regards Khaniya Sunil

      C Offline
      C Offline
      Calla
      wrote on last edited by
      #2

      If I understand your question correct - yes, you can use Linq to search a List (using Linq to Objects). For an example, have a look at this. Good luck :)

      K 1 Reply Last reply
      0
      • C Calla

        If I understand your question correct - yes, you can use Linq to search a List (using Linq to Objects). For an example, have a look at this. Good luck :)

        K Offline
        K Offline
        Khaniya
        wrote on last edited by
        #3

        hi Calla Thanks for your response Actually I am talking about custom Liked List(data structure). where nodes are connected via reference to each other We are having reference of only first node. Thanks

        A 1 Reply Last reply
        0
        • K Khaniya

          hi Calla Thanks for your response Actually I am talking about custom Liked List(data structure). where nodes are connected via reference to each other We are having reference of only first node. Thanks

          A Offline
          A Offline
          Anurag Gandhi
          wrote on last edited by
          #4

          You can use linq only on those objects which can be treated as a collection of objects. You can read your link list at a time and store it in a list or array and then you can apply linq query to them.

          Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.

          K 1 Reply Last reply
          0
          • A Anurag Gandhi

            You can use linq only on those objects which can be treated as a collection of objects. You can read your link list at a time and store it in a list or array and then you can apply linq query to them.

            Anurag Gandhi. http://www.gandhisoft.com Life is a computer program and every one is the programmer of his own life.

            K Offline
            K Offline
            Khaniya
            wrote on last edited by
            #5

            Thanks Anurag

            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