SyntaxFix
Write A Post
Hire A Developer
Questions
You may find it easier to use the is keyword:
is
if (mycontrol is TextBox)