Why does the following function take object type of parameters in WPF MVVM?
public ViewModel()
{
SaveCommand2 = new DelegateCommand(SaveCommand_Execute);
}
bool SaveCommand_CanExecute(object arg)
{
return Model.Name != string.Empty;
}
by default we are not passing anything as parameter in function, as such NULL is passed into it.
If we don't want to pass anything, better remove parameter from function. But it is not allowing. Why?