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. create object with string parametert

create object with string parametert

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 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.
  • M Offline
    M Offline
    maxfava
    wrote on last edited by
    #1

    Hi folk, I have my form class with the public sub openformmodify(BYVal form_modify_Objname as string) The problem is if the name of the object is product generally I must crate the object: dim form as product = new product But I want that the name of the class must be pass as string and the object must be create by the string value es.: public sub openformmodify(BYVal form_modify_Objname as string) dim form as (form_modify_Objname)?? = new (form_modify_Objname)?? End sub ?? How can make this?

    N 1 Reply Last reply
    0
    • M maxfava

      Hi folk, I have my form class with the public sub openformmodify(BYVal form_modify_Objname as string) The problem is if the name of the object is product generally I must crate the object: dim form as product = new product But I want that the name of the class must be pass as string and the object must be create by the string value es.: public sub openformmodify(BYVal form_modify_Objname as string) dim form as (form_modify_Objname)?? = new (form_modify_Objname)?? End sub ?? How can make this?

      N Offline
      N Offline
      Natty Gur
      wrote on last edited by
      #2

      Using System.Reflaction

      M 1 Reply Last reply
      0
      • N Natty Gur

        Using System.Reflaction

        M Offline
        M Offline
        maxfava
        wrote on last edited by
        #3

        Yes, I found an example of VB.NET but seems too complicate. Is there a way more fast and more simple? Could you provide an example? Thanks you ;)

        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