Lambda expressions and the Action<Object> delegate

The Action<Object> delegate is used in RelayCommands, DelegateCommands.

Code snippets below:
  public class SimpleDelegateCommand : ICommand
    {
        Action<object> _executeDelegate;

          public SimpleDelegateCommand(Action<object> actionDelegate)
        {
            _executeDelegate = actionDelegate;
        }

etc.

 public class Methods
    {
       // A method that doesn't had any parameters
        public static void NoParameterMethod()
        {
            MessageBox.Show("The Method that doesn't take a parameter was Called");
        }

The question I have is: Why is the following acceptable?

       private ICommand _test2Command = new SimpleDelegateCommand(y => Methods.NoParameterMethod());

That is:
given that the SimpleDelegateCommand needs and Action<object> delegate to be passed as an argument, how can a method that doesn't take any parameters be allowed by the delegate?
quentinAAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
If I look at the description for Action<T> delegate, I see a clue:

Action<T> Delegate
http://msdn.microsoft.com/en-us/library/018hxwa8.aspx

"You can use this delegate to pass a method as a parameter without explicitly declaring a custom delegate"

Methods.NoParameterMethod is a method, and the Action<T> delegate can be used to pass a method as an argument.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.