Hi,
I have the following code and it won't compile because the compiler cannot determine the return type of my CanExecute method. Can someone help me as to what is wrong?
class ViewCommand : ICommand
{
#region ICommand Members
public delegate Predicate<object> _canExecute(object param);
private ICommand _Execute;
_canExecute exe;
public bool CanExecute(object parameter)
{
return exe == null ? true : exe(parameter); // <-- Error no implicit conversion between Predicate<object> and bool
}
... // more code
}