Hi all,
I am a VB programmer who is moving out of the shadows and starting to
code in C#. I would like to know how to determine a control's type
using a swtich statement. In VB i would do something like this:
Private Sub TestControl(ByRef PassedControl as Control)
Select Case True
Case TypeOf PassedControl Is TextBox
'Do something
Case TypeOf PassedControl Is ComboBox
'Do something completely different
Case Else
'Puke
End Select
End Sub
Is there any similar method in C#?
Thanks,
Jimmy V