I have Dictionary:
public Dictionary<int, string> jobs = new Dictionary<int, string>();
It is filled like this:
this.jobs.Add(1, "Усі види підземних робіт, відкриті гірничі роботи.");
I tried to add values from jobs Dictionary:
foreach (KeyValuePair<int, string> kvp in jobs.get()) {
listBox1.Items.Add(String.Format("№{0} - ({1})", kvp.Key, kvp.Value.ToString()));
}
As you can see I add to list value "№{0} - ({1})". But how to set key?
jobs.getdictionary has not such method