I need to increase the value of a specific key in a Hashtable
,
here is my code (I want to create the Hashtable
during the function,
and I want the table to be like that - <string><int>
):
public void getMssg(string ipSend, string mssg, Hashtable table)
{
if (table.Contains(ipSend))
table[ipSend]++; //error
}
By the way, can I define a Hashtable
like I wrote above?