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

Discussion in 'B4J Questions' started by Mashiane, Nov 23, 2018.

Tags:
  1. Mashiane

    Mashiane Expert Licensed User

    Ola

    How do I determine the type of value a map value is e.g. string, map, list, int, float etc

    Is it possible?

    Thanks
     
  2. MarkusR

    MarkusR Well-Known Member Licensed User

    with "is" (should be a object) or GetType

    Code:
    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))
     
    Mashiane likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice