Skip to content

Instantly share code, notes, and snippets.


gdyrrahitis/MainForm.cs Secret

Created Nov 10, 2018
What would you like to do?
// Undo button handler
private void undoButton_Click(object sender, EventArgs e)
// If history list (stack) contains any command
if (_commands.Any())
// Pop it out and undo it
var command = _commands.Pop();
// Refresh UI (trivial operation, omitted for brevity)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.