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. Visual Basic
  4. Getting the name of an instance

Getting the name of an instance

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
2 Posts 2 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.
  • E Offline
    E Offline
    edmonson
    wrote on last edited by
    #1

    Hi, I need to get the name of an instance of class. Perhaps, using reflection? Below i show the example class Idle Public one as int32 end class class form1 Dim MyIdle as new Idle public Sub button1_click(sender,...) handles button1.click textbox1.text= ?¿ end Sub end class How can i get the name 'MyIdle' ??

    T 1 Reply Last reply
    0
    • E edmonson

      Hi, I need to get the name of an instance of class. Perhaps, using reflection? Below i show the example class Idle Public one as int32 end class class form1 Dim MyIdle as new Idle public Sub button1_click(sender,...) handles button1.click textbox1.text= ?¿ end Sub end class How can i get the name 'MyIdle' ??

      T Offline
      T Offline
      testy_proconsul
      wrote on last edited by
      #2

      hi! you can't get the variable name. With Reflection you can get types of assemblies, for example. but a variable name is not metadata in a compiled assembly, because a variable is only a location in the ram.

      solidIT.de - under construction Components for Microsoft .Net audittrail, objectcomparer, deepcopy and much more ...

      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