C doesn't have templates at all, so both class and typename are unique to C++. They're also both standard, but class is an older form, so you're likely to see it more often. There are various personal preferences for how to use it; my preference is to use typename pretty much exclusively.
 class was used originally because the designers didn't want to add a new keyword to the language. But when a new keyword was needed for other things (typename), it was basically overloaded to handle this job as well.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...