Return to Snippet

Revision: 11023
at January 21, 2009 07:54 by leonbda


Initial Code
using System.Collections.Generic;

// create
Dictionary<int, bool> MyDictionary = new Dictionary<int, bool>();

// fill
MyDictionary.Add(1, true);

// iterate
foreach (KeyValuePair<int, bool> dictitem in MyDictionary)
                {
                    if (dictitem.Key == 1)
                        // ...
                }
}

Initial URL

                                

Initial Description
Working with System.Collections.Generic.Dictionary

Initial Title
Dictionary - Create, Fill, Iterate

Initial Tags

                                

Initial Language
C#