I am iterating over a Hashtable to extract the Keys, then attempting to build a string to acheive something like this:
"1, 2, 5, 9, 100, 50". This string is then used in an SQL query as a set of integers.
the problem is removing the last "," off the end, i.e the last element of the String, I get index out of bounds, or value is less than 0 .... any help would be appreciated.
public int calculatePriorityLevel()
StringBuilder builder = new StringBuilder(100);
foreach (string strKey in myHashtable.Keys)
builder.Remove((builder.Length - 1), 1);