1
2
3
4
5
6
7
8
9
10
11
12
|
Public Function BooleanConverter(ByVal Src As Object) As Boolean
If Src Is Nothing Then Return False
Dim W As String = ";yes;on;1;y;enabled;ein;true;"
Dim SrcW As String
SrcW = System.ComponentModel.TypeDescriptor.GetConverter(Src.GetType).ConvertToString(Src)
If W.Contains(";" & SrcW.ToLower & ";") Then
Return True
Else
Return False
End If
End Function
|