You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we go ahead and add support for extended names in property patterns (if (e is MethodCallExpression { Method.Name: "MethodName" })), it makes sense for symmetry to allow this in with and object creation expressions:
methodCallExpression with { Method.Name = "MethodName" } new MethodCallExpression(...) { Method.Name = "MethodName" }
Motivation
This is particularly useful in the with expression, so you don't have to write: methodCallExpression with { Method = methodCallExpression.Method with { Name = "MethodName" } }
nested members in
with
and object creationSummary
If we go ahead and add support for extended names in property patterns (
if (e is MethodCallExpression { Method.Name: "MethodName" })
), it makes sense for symmetry to allow this inwith
and object creation expressions:methodCallExpression with { Method.Name = "MethodName" }
new MethodCallExpression(...) { Method.Name = "MethodName" }
Motivation
This is particularly useful in the
with
expression, so you don't have to write:methodCallExpression with { Method = methodCallExpression.Method with { Name = "MethodName" } }
Detailed design
Drawbacks
Alternatives
Unresolved questions
Design meetings
The text was updated successfully, but these errors were encountered: