lDictionaries
l
l /* Create dictionary of squares and look up and sum entries */
l Hashtable Dictionary=new
Hashtable(31);
l long i;
l long sum=0;
l int
m=int.Parse(this.textBox5.Text);
l int
n=int.Parse(this.textBox6.Text);
l for (i=m;i<=n;i++)
Dictionary.Add(i,(i*i));
l MessageBox.Show("Created
dictionary","Created Dictionary",
l MessageBoxButtons.OK,MessageBoxIcon.Information);
l for (i=m;i<=n;i++)
sum=sum+(long)Dictionary[i];
l MessageBox.Show("Sum(dictionary
entry = n*n) from "+m.ToString()+
l " to
"+n.ToString()+" = "+sum.ToString(),"Summed
Dictionary",
l MessageBoxButtons.OK,
MessageBoxIcon.Information);
l