I’m using a series of commands called RelayCommand which have a function to execute and a function that returns a bool telling whether or not you can execute the first function. The fact is that I’m using the lambda expression () => true most of the time. Is there any expression that I can use to make it more readable? Like System.TrueFunction or something similar.
See it in context:
this.PasteFromExcelCommand = new RelayCommand(PasteFromExcel, this.OneRowSelected);
this.SaveCommand = new RelayCommand(this.SaveSession, CanSave);
this.SwitchViewCommand = new RelayCommand(this.SwitchView, () => true);
this.ExitCommand = new RelayCommand(this.Exit, () => true);
Just create your own
And use it like this