Hello, all
I am currently doing the following:
lblPrice1.Text = arrPrices(1)
lblPrice2.Text = arrPrices(2)
lblPrice3.Text = arrPrices(3)
lblPrice4.Text = arrPrices(4)
lblPrice5.Text = arrPrices(5)
But I'd like to change it so it is done dynamically. I would like to
do something like:
Dim NUMPRODUCTS As Integer = 5
For i As Integer = 1 To NUMPRODUCTS
Execute( "lblPrice" & i & ".Text = arrPrices(" & i & ")" )
Next
I've read that I can do a complicated process of saving the code as a
DLL and then executing it, but I'd prefer a built-in function. Any
pointers?
Thanks,
Morgan Seppy
I am currently doing the following:
lblPrice1.Text = arrPrices(1)
lblPrice2.Text = arrPrices(2)
lblPrice3.Text = arrPrices(3)
lblPrice4.Text = arrPrices(4)
lblPrice5.Text = arrPrices(5)
But I'd like to change it so it is done dynamically. I would like to
do something like:
Dim NUMPRODUCTS As Integer = 5
For i As Integer = 1 To NUMPRODUCTS
Execute( "lblPrice" & i & ".Text = arrPrices(" & i & ")" )
Next
I've read that I can do a complicated process of saving the code as a
DLL and then executing it, but I'd prefer a built-in function. Any
pointers?
Thanks,
Morgan Seppy
Comment