I’m using VS 2005 fx2.0.
If I know my Dictionary contains only 1 item how do I get to it?
Thanks,
rod
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The only way (with framework 2.0) is to iterate over it with foreach.
Or make a method that do that, like:
It works with all IEnumerable and in your case T is KeyValuePair