Results 1 to 3 of 3

Thread: Get Variable Names from a string

  1. #1

    Thread Starter
    Junior Member mharley's Avatar
    Join Date
    Jan 2002
    Location
    Nova Scotia, Canada
    Posts
    24

    Question Get Variable Names from a string

    Is it possible to derive a variable name from a string? For example, you read the string "English", and you then create a variable (array) named "English". Is there anyway to do this?
    Cheers!

    Mark

  2. #2

    Thread Starter
    Junior Member mharley's Avatar
    Join Date
    Jan 2002
    Location
    Nova Scotia, Canada
    Posts
    24

    Geez.....

    Are my threads really that boring?!?
    Cheers!

    Mark

  3. #3
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    cant do dat!

    closest you can get to that is specific checking for strings

    If thestring = "elephant" Then
    Dim elephant
    End if

    and of course that would be dumb..it really doesnt matter anyway as you have to realize that when your app is compiled..all that stuff is just 1's and 0's. So why would it be importatn to dynamically create a vrailbe from a string during runtime with the name of the string? No reason to do this at all.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

Posting Permissions

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



Click Here to Expand Forum to Full Width