| andrewmcdonagh 2007-02-04, 6:55 pm |
| On Feb 3, 12:20 am, "Pete Dashwood"
<dashw...@removethis.enternet.co.nz> wrote:
> "andrewmcdonagh" <andrewmcdon...@gmail.com> wrote in message
>
> news:1170416819.673830.134600@k78g2000cwa.googlegroups.com...> On Feb 2, 1:42 am, LX-i <lxi0...@netscape.net> wrote:
>
> <snip>
>
>
> Er...not necessarily... :-)
>
> Although C# supports the Hashtable function (so Java folks can remain
> comfortable...:-)), it is much better to use the C# Dictionary Class
> because it doesn't require boxing and unboxing of objects.
>
> Furthermore, the Dictionary Class DOES support a collection of Keys and
> Values as separate entities, if you want this.
>
> I have no issue with the approach (it's very good), but would strongly
> recommend Dictionary, rather than Hashtable.
>
> (Check out the VS 2005 Help index for "Dictionary"...)
>
Yeah I saw Dictionary, though I thought that autoboxing would not
happen with String objects... this is my Java expo making me assume
things not necessary correct in c#.
nice one though!
snipped...
>
> Really good sample code above, Andrew. Good stuff!
>
> Pete.
Cheers, though it wasn't mine, I copied it from MSDN and edited to fit
with our topic of keywords...
|