(02-28-2014, 06:50 AM)Mushroom Face Wrote: Its easier in VB.net to use a string than it is a char. Due to the programming lessons often given.
P.S. Why the dictionary again?
In VB.NET it's just as easy, it just takes another explicit character to say that you're using a char... i.e.:
Since coincidentally, the people who invented the language decided to use ' as a comment identifier. *chuckles*
Hey, which post are you referring to when you ask about the dictionary? I use a dictionary over others because it's also the most modern class to be using in the .NET framework for such features. It essentially superseded the Hashtable by the time it came out in System.Collections. Yeah, you'll see various benchmarks between all of these similar classes though from all of the keener's of the .NET framework...
The main difference is, a Hashtable stores the data as a type of System.Object, kind of like an ArrayList, which makes for the same reason why a List<T> is preferred instead. A Dictionary of a specific type (not System.Object) yields better performance than a Hashtable for value types typically, because with the Hashtable, phenomena such as boxing and unboxing need to occur when you insert or retrieve an entry from the collection. So both implement the IDictionary interface, but both are still quite different.