I\'m a C# programmer who is forced to use VB (eh!!!!). I want to check multiple controls state in one method, in C# this would be accomplished like so:
if ((
Casting in VB.net uses the keyword ctype. So the C# statement (CheckBox)sender is equivalent to ctype(sender,CheckBox) in VB.net.
ctype
(CheckBox)sender
ctype(sender,CheckBox)
Therefore your code in VB.net is:
if ctype(sender,CheckBox).Checked =True Then ' Do something... else ' Do something else... End If