private int GetIndexOfParameter(string key) { for (int i = 0; i < parameters.Count; i++) { if (parameters[i].Key == key) return i; } return -1; }