First, the code you wrote was nonsense, you tried to declare a parameter during a function invocation. You then tried to pass the result of that invocation (which should have been void) to a constructor expecting an Action<object> or possibly an Action delegate. You just can't do that.

Second, The ICommand interfaces Execute method (which is really what you are implementing) looks like this:

void Execute(object parameter)

Where parameter is passed via the CommandParameter property on the calling object (ie, a Button). The DelegateCommand object implements this and calls the delegate passed on the constructor with the same arguments (some versions of that class will allow you to pass a simple Action and DelegateCommand ignores parameter for you).