Posted By


BrentS on 07/29/11

Tagged


Statistics


Viewed 153 times
Favorited by 0 user(s)

KeyValuePair System.Collections.Generic


/ Published in: C#
Save to your folder(s)

Simple example of a Key Value Pair using System.Collections.Generic.


Copy this code and paste it in your HTML
  1. using System.Collections.Generic;
  2.  
  3. Dictionary<int, bool> MyDictionary = new Dictionary<int, bool>();
  4.  
  5. MyDictionary.Add(1, true);
  6.  
  7. foreach (KeyValuePair<int, bool> dictitem in MyDictionary)
  8. {
  9. if (dictitem.Key == 1)
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.