I don't do a bunch of work in VB.net, however I'd like to do some things that I do in other languages.
I have a form that has a bunch of rows of text boxes. Instead of creating setters for each text box of each row, I wish to have a dynamic setter, which can set the value based on a string value. E.g. An text box in row one has a name like tbName1
, while row two has tbName2
. Notice the pattern, where the number changes at the end.
I believe I'll need to iterate through all components on the form, get a match of the name and verify the component type is an text box. If both match, then set the value.
Solution needs to work with .NET 3.5 framework.