CType
1 | dim x as system.decimal |
Occasionally I’ll place controls into arrays, pulling them out are quite difficult - because the array will be declared as an object, it will come as an object and none of the properties associated with that object are available.
In one case I placed a control of type UC_INPUT into panel object - If I want to place something into the VALUE property I could use a command similar to the following.
1 | CType(pnlUps.Controls(x), uc_Input).Value = aRow(x).ToString |
In another case, I placed multiple controls into that same panel object. If I wanted to initialize the VALUE propery of each I could do something like the following:
1 | For Each aControl As Control In pnlUps.Controls |