[Gambas-user] Collection Key Error?

Denis Crowther denisc at exemail.com.au
Mon Jan 28 11:40:24 CET 2019


Hi Guys,

If I add to a collection and the Key already exists the value is simply 
overwritten. No error is raised.

Is this this the expected behaviour or a bug that will be fixed at some 
point?

Regards
Denis

'----------------------------
Dim cc As New Collection

   cc.Add("test1", "MainKey")
   Debug cc["MainKey"]

   cc.Add("test2", "MainKey")
   Debug cc["MainKey"]

OUTPUT:
Form1.Button1_Click.68: test1
Form1.Button1_Click.70: test2
'----------------------------
-- 
Regards
Denis


More information about the User mailing list