peacefulmember wrote:
but is there a way to do what I want to do,
I already told you, no.
peacefulmember wrote:
other than using select case or If..Else.
The only other method is to use Reflection, but it's incredibly slow. You really need to rethink this design. You're treating variable names as an integral part of the Data and Business Logic, which you should NEVER do, nor do you ever need to do it in a proper design. You're combining functions that really should be seperated. You're needlessly trying to get a single function to return a value from a number of arrays when this is never necessary. If you want functionality like this, put your data into DataTables.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007