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. how to pass two parameters in the address of thread , along with it's method name

how to pass two parameters in the address of thread , along with it's method name

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
4 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.
  • N Offline
    N Offline
    Nilish
    wrote on last edited by
    #1

    i have a method that contains two parameters . Now my question is , how should i give the address of that method to thread , as the thrad don't allow two parameters ?

    G 1 Reply Last reply
    0
    • N Nilish

      i have a method that contains two parameters . Now my question is , how should i give the address of that method to thread , as the thrad don't allow two parameters ?

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      There are two different ways of doing that: 1. Create a class as a container for the two values, and send an instance of the class to the method. 2. Put the method in a class among with two member variables, and put the values in the member variables before starting the thread so that the method can access them.

      Despite everything, the person most likely to be fooling you next is yourself.

      M 1 Reply Last reply
      0
      • G Guffa

        There are two different ways of doing that: 1. Create a class as a container for the two values, and send an instance of the class to the method. 2. Put the method in a class among with two member variables, and put the values in the member variables before starting the thread so that the method can access them.

        Despite everything, the person most likely to be fooling you next is yourself.

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        3 Pass an array of values into the delegate (I think)

        Never underestimate the power of human stupidity RAH

        G 1 Reply Last reply
        0
        • M Mycroft Holmes

          3 Pass an array of values into the delegate (I think)

          Never underestimate the power of human stupidity RAH

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Yes, that would work. I would call it a cheap version of #1. :)

          Despite everything, the person most likely to be fooling you next is yourself.

          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