using Xojo.Core.Dictionary
Dim dict as new Dictionary
How does Xojo know my dictionary variable is referring to the dictionary class in the Xojo.Core namespace as opposed to the one in the classic framework? To me, it’s not clear and a bit confusing. Should I instead always declare things like this for clarity:
Dim dict as new Xojo.Core.Dictionary
Is there any benefit to doing it the second way aside from clarity?
The Using clause says “anything that I use in this code from this point on MAY be part of Xojo.Core so prefer those over anything else”
So because Dictionary exists as Xojo.Core.Dictionary it knows that you mean that one not the old global Dictionary
However if you intermingle old & new framework code then it can be unclear.
The second form is more verbose BUT it’s also more explicit
As more things get added to the new framework there will likely be a point where you will want to use the Using clauses and use only new framework code
At this point I would use the longer explicit form as its not uncommon to intermingle code using both old & new frameworks
And of course none of this applies on iOS as it only has access to the new framework
Thank you, Norman. I wondered if it was something like what you described and I’m glad to see it’s as simple as that. I don’t mind verbosity if it makes things cleaner and clearer. Thanks for the fast and detailed reply!