One simple solution would be to use a List
instead of an array.
List<string> temp = new List<string>();
It will need some tweaks but it will not limit you to 100 actions.
In any other case, you should decide the strategy. Do you want to delete the initial items? Then remove your first X items and replace them with the latest ones.
0
solved how can i fix System.IndexOutOfRangeException: ‘Index was outside the bounds of the array.’ in my undo and redo? [closed]