Hi all

I'm totaling up a list of items in a Binding source and I am just having a small problem with syntax for incrementing the value of a key if it already exists


any help is greatly appreciated line 16 below


C# Code:
  1. SortedList mySortedList = new SortedList();
  2.             foreach (DataRowView view in myBindingSource)
  3.             {
  4.                 if ((string)view["group_name"] == "USAT-Desktop")
  5.                 {
  6.                     view["group_name"] = "TEST TEST";
  7.                 }
  8.                
  9.                
  10.                if (mySortedList.Contains(view["category_name"])== false)
  11.                {
  12.                    mySortedList.Add(view["category_name"], 1);
  13.                }
  14.                else
  15.                {
  16.                //how do I ++ the value of the key if it already exists?
  17.                //mysortedlist[view["category_name"]].value +=1?
  18.                }