S
Steve
How can I achieve this in VB?
I'm using VB.Net 2005. I have a framework that auto-generates a lot
of non-arrayed variables with a consistent naming scheme, like:
float1, float2, ... float24
The framework also gives me a "Count" variable. I need to find
someway to loop through the variables in order. I know how to do this
in other languages, but not in VB. I'm looking for something like the
following pseudocode:
FOR i = 1 TO Count
current = get_var_by_name("float" & i.ToStr())
DoWork(current)
NEXT i
Obviously this is what arrays are for, but I have no control over the
framework and I cannot change it to produce arrays.
Any ideas how to work with what I've got?
Thanks,
Steve
I'm using VB.Net 2005. I have a framework that auto-generates a lot
of non-arrayed variables with a consistent naming scheme, like:
float1, float2, ... float24
The framework also gives me a "Count" variable. I need to find
someway to loop through the variables in order. I know how to do this
in other languages, but not in VB. I'm looking for something like the
following pseudocode:
FOR i = 1 TO Count
current = get_var_by_name("float" & i.ToStr())
DoWork(current)
NEXT i
Obviously this is what arrays are for, but I have no control over the
framework and I cannot change it to produce arrays.
Any ideas how to work with what I've got?
Thanks,
Steve