There are several mistakes in this code:
1. The case is important. It should be MyMap.Get("value")
2. If you are interested in a specific key and you are not sure whether it exists or not then you should check it with ContainsKey:
B4X:
If MyMap.ContainsKey("value") Then
Dim value As Int = MyMap.Get("value")
End If
Another option if you want to be more sophisticated:
Thanks Erel, I will use your suggestions.
I probably should have found that myself, but although I did one project a few years ago I am really a newbie and I can only take in so much at a time.
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.