B4J Question How to detect the variable type of a map value?

MarkusR

Well-Known Member
Licensed User
Longtime User
with "is" (should be a object) or GetType

B4X:
    Dim a As String="abc"

   If MainForm Is Form Then
       Log("Jo")
   End If
   
   Dim O As Object
   O = MainForm
   If O Is Canvas Then
       Log("Canvas")
   Else
       Log("Not a Canvas")
   End If

   Log(GetType(MainForm))
   Log(GetType(Canvas1))
   Log(GetType(a))
 
Upvote 0
Top