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. Dynamic expression

Dynamic expression

Scheduled Pinned Locked Moved C#
question
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.
  • W Offline
    W Offline
    Wilson Wu
    wrote on last edited by
    #1

    Hi, How can get the object from this string ? string abc = "this.abc"; Thanks Wilson

    P K 2 Replies Last reply
    0
    • W Wilson Wu

      Hi, How can get the object from this string ? string abc = "this.abc"; Thanks Wilson

      P Offline
      P Offline
      Peter Wone
      wrote on last edited by
      #2

      Reflection.

      W 1 Reply Last reply
      0
      • P Peter Wone

        Reflection.

        W Offline
        W Offline
        Wilson Wu
        wrote on last edited by
        #3

        Would you mind give a example ?

        1 Reply Last reply
        0
        • W Wilson Wu

          Hi, How can get the object from this string ? string abc = "this.abc"; Thanks Wilson

          K Offline
          K Offline
          KrunalC
          wrote on last edited by
          #4

          I'm not able to understand your exact problem. But what I have understood from your msg is that you want the object to be made from string variable. If that is the case, I suppose boxing is the solution for you. e.g. object obj = (object)abc; Pls excuse if I have misunderstood, Krunal C

          W 1 Reply Last reply
          0
          • K KrunalC

            I'm not able to understand your exact problem. But what I have understood from your msg is that you want the object to be made from string variable. If that is the case, I suppose boxing is the solution for you. e.g. object obj = (object)abc; Pls excuse if I have misunderstood, Krunal C

            W Offline
            W Offline
            Wilson Wu
            wrote on last edited by
            #5

            the problem is solved by others. Thanks

            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