ICommand
ICommand is an interface in the Microsoft .NET framework that defines a contract for command objects. It is commonly used in applications to encapsulate a request as an object, allowing for parameterization of clients with queues, requests, and operations. This pattern promotes separation of concerns and enhances the flexibility of the code.
The ICommand interface typically includes methods like Execute and CanExecute, which determine whether a command can be executed and perform the action when invoked. This is particularly useful in MVVM (Model-View-ViewModel) architecture, where it helps manage user interactions in a clean and maintainable way.