I suggest you ...

lambda function named parameters

It would really nice if Func delegates could be called/used with named parameters, for example, if:

public Func<int, int, int> Add = (num1, num2) => num1 + num2;

-----
could be used like thi:

int sum = Add(num1: 50, num2: 60);

-----------
(where(num1 and num2 are the named parameters)

32 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

3 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...
  • Matete Sekhwela commented  ·   ·  Flag as inappropriate

    Func<Entity, EntityCollection> GetAllActiveLeads = (eReturnDataCollection) =>
    {
    QueryExpression query = new QueryExpression("lead");
    query.ColumnSet = new ColumnSet(true);
    //TO DO
    EntityCollection eDataCollection = service.RetrieveMultiple(query);

    return eDataCollection;
    };

  • Matete Sekhwela commented  ·   ·  Flag as inappropriate

    Func<Entity, EntityCollection> GetAllActiveLeads = (eReturnDataCollection) =>
    {
    QueryExpression query = new QueryExpression("lead");
    query.ColumnSet = new ColumnSet(true);
    //TO DO
    EntityCollection eDataCollection = service.RetrieveMultiple(query);

    return eDataCollection;
    };

    //Thanks a lot my man :)

Feedback and Knowledge Base