public void Execute() { if (recorded == null || getTextBox == null) { return; } for (int i = 0, count = recorded.Count; i < recorded.Count; i++) { MulticaretTextBox tb = getTextBox(); if (tb == null) { return; } Action action = recorded[i]; tb.ProcessMacrosAction(action); } }