amir <am**@discussions.microsoft.comwrote:
how can I access the first item of a dictionary where the datatype for the
Key is not known to me?
What exactly do you mean by "first"? Dictionaries are inherently
unordered. You could use the enumerator to find the first value to come
out, but there's no guarantee that was the first which was put in.
I tried the array index 0 and taht did not work because the key is not of
integer type.
If you don't know the generic type parameters of the dictionary, how
are you accessing it? You may need to use reflection to get at the bits
of the item if you don't know the type parameters.
--
Jon Skeet - <sk***@pobox.com>
Web site:
http://www.pobox.com/~skeet
Blog:
http://www.msmvps.com/jon.skeet
C# in Depth:
http://csharpindepth.com