private int GetPriority(string operation) { int i = 0; for (i = 0; i < operations.Length; i++) { if (operations[i] == operation) break; } return i / 2; }