Types comparison in VB.NET

后端 未结 4 988
春和景丽
春和景丽 2021-02-12 07:24

How i can compare type data type in VB.NET? My code:

Private Function Equal(ByVal parameter As String, ByVal paramenterName As String, ByVal dataType As Type) As         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-12 07:59

    This is probably the best way to do it in VB.

    If dataType Is String Then
        return 1
    End If
    

提交回复
热议问题