利用枚举的IsDefined方法。
例:
Public Enum ControlState OpenCamcorder CloseCamcorder StartCapture EndCapture End Enum Private Function IsXXX(ByVal state As ControlState) As Boolean If ControlState.IsDefined(GetType(ControlState), state) = False Then Return False Else Return True End If End Function
以上就是自信鲜花最近收集整理的关于判断枚举值是否存在的全部内容,更多相关判断枚举值是否存在内容请搜索靠谱客的其他文章。
发表评论 取消回复