robot_2Generated
code_blocksInput

Description

The Back property represents a stack that stores undo entries in the UndoSystem. This stack is used to keep track of actions that can be undone. Each entry in the stack is an instance of UndoSystem.Entry, which encapsulates the details of an undoable action.

Usage

Use the Back property to access the stack of undo entries. This stack is manipulated internally by the Undo and Redo methods of the UndoSystem. You can inspect the stack to understand the current state of undoable actions, but direct manipulation is typically not necessary unless implementing custom undo logic.

Example

// Example of accessing the Back property
var undoSystem = new UndoSystem();

// Access the stack of undo entries
var undoStack = undoSystem.Back;

// Check if there are any actions to undo
if (undoStack.Count > 0)
{
    // Peek at the top entry without removing it
    var topEntry = undoStack.Peek();
    // Display the title of the top undo entry
    Console.WriteLine($"Next undo action: {topEntry.Title}");
}