Android Question Is there a way to create/return an explicit cast of a List/Map.

Discussion in 'Android Questions' started by Martin D., Jul 29, 2019.

  1. Martin D.

    Martin D. Member Licensed User


    Dim myLife as Map (As yearstring, As Wine)

    If myLife.Get("2019").IsTonsOfWine = True Then...
    Because I haven't found any with the IDE or in the forums.

    That would be a huuuuuuuuuuuuuuuuuuuuuuuge time saver I believe.

    Thanks !
  2. Erel

    Erel Administrator Staff Member Licensed User

    No. However you can create a helper sub:
    Sub GetWine (Year As StringAs Wine
    Return myLife.Get(Year)
    End Sub
    (or pass the map as the first parameter if there are several maps)

    If GetWine("2019").IsGood Then
  3. DonManfred

    DonManfred Expert Licensed User

    Dim myLife as Map = CreasteMap(yearstring:Wine)
  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