public void SetResult(int index, Operand operand) { switch (index) { case 0: Result = operand; return; case 1: Result2 = operand; return; default: throw new IndexOutOfRangeException(); } }