コード例 #1
0
 public MySuperDictionary()
 {
     this.dictionaries = new Dictionary <KEY, VALUE> [373];           // must be a prime number.
     for (int i = 0; i < dictionaries.Length; ++i)
     {
         dictionaries[i] = new Dicionary <KEY, VALUE>(13000000 / dictionaries.Length);
     }
 }
コード例 #2
0
     // Methods
 
     public MainWindow()
     {
         InitializeComponent();
         
         // New dictionary of dogs
         Dogs = new Dictionary<string, Dog>();
 
         // adding Dogs objects
         Dogs.add("maxwell", new Dog("Maxwell)); 
         Dogs.add("maxwell", new Dog("Fred"));
 
     }