Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a function dynamically

Tags:

vb.net

I have in vb a selector

Dim ver =101
Select Case ver
        Case 101
            upd101()
        Case 102
            upd102()
        Case 103
            upd103()
    End Select

How can I make this select better by calling function in more dynamically in this form: with the prefix "upd" followed by a ver integer..?

thank you! Adrian

like image 978
Adrian Avatar asked Apr 07 '26 07:04

Adrian


1 Answers

Can't you just call upd(param)?

I mean, rather than creating many functions, create one and use variables. ;]

like image 189
Tomasz Kowalczyk Avatar answered Apr 10 '26 01:04

Tomasz Kowalczyk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!