我知道在 VBA 中如何对控件类型进行 Select..Case 比较,例如:
Select Case TypeName(ctrl)
case is = "ListBox"
...
case is = "ComboBox"
...
...
End Select
在 VB.Net 中,我可以使用上面的通用值,还是必须在文本中使用命名空间限定符?
目前实施:
public function Validate(byref ctrl as WebControl) as boolean
select case TypeName(ctrl)
case is = "TextBox"
....
case is = "Label"
....
...
End select
End Function