Method group for parameter-less methods. #921
Replies: 7 comments
-
See #91 |
Beta Was this translation helpful? Give feedback.
-
@jnm2 cool, didn't saw that. hmm I don't see necessity of @ by the way. |
Beta Was this translation helpful? Give feedback.
-
Check out the other issues linked to #91 too. |
Beta Was this translation helpful? Give feedback.
-
@MkazemAkhgary |
Beta Was this translation helpful? Give feedback.
-
@MkazemAkhgary, var res = listOfLists.Where(Enumerable.Any); but that's not really shorter than: var res = listOfLists.Where(l => l.Any()); |
Beta Was this translation helpful? Give feedback.
-
@quinmars you can use static imports to import 'Enumerable.Any' than code is short: var res = listOfLists.Where(Any); |
Beta Was this translation helpful? Give feedback.
-
@RogerWaters nice idea! This would even be shorter. It does not work, though, for IMHO, lambda expressions are compact enough and I do not need any obscure shortening here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is 😕 to me, but lets give it a shot. allow method groups for parameter less methods. for example
x => x.Foo()
becomes.Foo
.Unfortunately
.
cant be omitted because it can cause ambiguity if field with same name already exist so that would be a breaking change.Would be kinda cool but you see these weird syntaxes more likely in c++ than in c# 😄.
Beta Was this translation helpful? Give feedback.
All reactions