Android Question Converting types

Steven Bacchioni

Member
Licensed User
Longtime User
I use this

Sub IntToBoolean(inInt As Int) As Boolean
If inInt = 0 Then Return False
Return True
End Sub

Sub BooleanToInt(inBoolean As Boolean) As Int
If inBoolean = False Then Return 0
Return 1
End Sub
 
Upvote 0

jotaele

Member
Licensed User
Longtime User
Thanks. Very simple functions that do the work. Nice.

I was looking for a library to converting types, like strings to numbers, etc. Something like VB.NET CInt, CBool, ...
 
Upvote 0
Top