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. get type of anonymous list

get type of anonymous list

Scheduled Pinned Locked Moved C#
question
3 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.
  • Z Offline
    Z Offline
    zeeShan anSari
    wrote on last edited by
    #1

    Hi all, let suppose var res = result.Select(s=> new {id=s.id,name=s.name}).ToList(); now i want pass this res in another method like func(res). Please tell me that how can i get the type of this res or how i can get data from res.

    N W 2 Replies Last reply
    0
    • Z zeeShan anSari

      Hi all, let suppose var res = result.Select(s=> new {id=s.id,name=s.name}).ToList(); now i want pass this res in another method like func(res). Please tell me that how can i get the type of this res or how i can get data from res.

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      Don't post to multiple forums, you have already asked this in Q&A. If the question is in multiple locations you will sort through multiple responses and people responding will not benefit from other responses in other forums and possibly give you duplicated and/or conflicting responses.


      No comment

      1 Reply Last reply
      0
      • Z zeeShan anSari

        Hi all, let suppose var res = result.Select(s=> new {id=s.id,name=s.name}).ToList(); now i want pass this res in another method like func(res). Please tell me that how can i get the type of this res or how i can get data from res.

        W Offline
        W Offline
        Wonde Tadesse
        wrote on last edited by
        #3

        Look this CodeProject Q/A.Get The type of anonymous list[^]

        Wonde Tadesse MCTS

        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