Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1928920
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T07:04:31+00:00 2026-05-17T07:04:31+00:00

I am looking at the code from here /// <summary> /// Returns the command

  • 0

I am looking at the code from here

/// <summary>
/// Returns the command that, when invoked, attempts
/// to remove this workspace from the user interface.
/// </summary>
public ICommand CloseCommand
{
    get
    {
        if (_closeCommand == null)
            _closeCommand = new RelayCommand(param => this.OnRequestClose());

        return _closeCommand;
    }
}

what does param in param => this.OnRequestClose() refer to?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T07:04:34+00:00Added an answer on May 17, 2026 at 7:04 am

    RelayCommand is presumably a delegate-type that accepts a single parameter, or a type that itself takes such a delegate-type in the constructor. You are declaring an anonymous method, saying simply “when invoked, we’ll take the incoming value (but then not use it), and call OnRequestClose. You could also have (maybe clearer):

    _closeCommand = new RelayCommand(delegate { this.OnRequestClose(); });
    

    It is probably clearer in other uses where it is used, for example:

    var ordered = qry.OrderBy(item => item.SomeValue);
    

    where the lambda is “given an item, obtain the item‘s SomeValue“. In your case the lambda is “given param, ignore param and call OnRequestClose()“

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question stems from this question Code documentation how much is too much? One
I'm looking for pointers and information here, I'll make this CW since I suspect
I am looking to have one of my Windows Forms applications be run programmatically—from
Following on from this question , I am interested in finding out how you
Everything in the code below works except for the binding on the ContextMenu. This
I'd like to create a unique temporary directory in Windows from some C code
I have this code: // Fill out the email body text NSString *emailBody =
I have inherited some code that is not working as I think it should:
Here is a twofold question, with a theoretical part, and a practical one: When
I'm working on a modification from a theme in the open source project gallery2.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.