Dynamic Variable Name Creation

Results 1 to 2 of 2

Thread: Dynamic Variable Name Creation

  1. #1
    Join Date
    Dec 1969

    Default Dynamic Variable Name Creation

    Hi,<BR><BR>I&#039;m creating a VB.net program that will not have any interface and will be run as a windows service, so i can&#039;t rely on any GUI objects.<BR>I need to monitor several pionts, i get their information from the database.<BR>Now for each of these , say they&#039;re a list of Strings unique.<BR>I wish to create a variable for each name i get from the database eg..<BR><BR>Dim dbresult as string<BR>dbresult = "forexample"<BR><BR>&#039;ok now here i wanna dynamically create the name<BR><BR>Dim ToString(dbresult) as String<BR>&#039;or is there a better way of doing this? i can&#039;t seem to find any such info online :(<BR>any help greatly appreciated.<BR>Steeko

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamic Variable Name Creation

    I think you want to store some key/value pairs, in that case it&#039;s better the use an Arraylist or Hashtable to store the info you want.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts