private string getItemAtIndex(int i) { int j = 0; foreach(string item in ValLstBox.Items) { if (j == i) return item; j++; } return ""; }