Named parameters for methods, positional parameters for linq expressions

I have created a post on stackoverflow

The issue is that I want to use named parameters for my methods, which I have set up easily. I then applied my code style to my project and when I went to build it, I got a load of errors:

> An expression tree may not contain a named argument specification

Here is an example of what resharper did:

```

public IQueryable<Message> ListByType(string type, string status) => List().Where(m => m.Type.Equals(value: type, comparisonType: StringComparison.OrdinalIgnoreCase) && m.Status.Equals(value: status)).OrderBy(m => m.NiceEndpoint.StartsWith("PSC") ? 0 : 1).ThenBy(m => m.DateCreated);

```

It is not immediately obvious that I can or cannot have two styles; one for methods and one for linq expressions.

0
1 comment
Official comment

Hello!

 

Thank you for the feedback.

Corresponding issue - https://youtrack.jetbrains.com/issue/RSRP-473853 is fixed in the latest ReSharper 2019.1.2.

Thank you.

Please sign in to leave a comment.