English 中文(简体)
什么是新lam子?
原标题:What s the new lambda syntax?
  • 时间:2012-01-13 22:13:58
  •  标签:
  • lambda
  • d

我听到,DMD2.058将设立一个新的星座,负责匿名工作,但我无法找到这方面的任何信息。 新yn子是什么,老的yn子是否会被 de弄?

最佳回答
问题回答

目前没有拆除现有的木.功能。 只是为那些想要这样做的人引进了一个新的 ter子。 http://stackoverflow.com/a/8857984/160887”

因此,不做类似的事情

auto found = find!((a){return func(a) == value;})(range);

你这样做了。

auto found = find!(a => func(a) == value)(range);




相关问题
Multiple Where clauses in Lambda expressions

I have a simple lambda expression that goes something like this: x=> x.Lists.Include(l => l.Title).Where(l=>l.Title != String.Empty) Now, if I want to add one more where clause to the ...

Lambda Expressions and Event Subscriptions

I ve heard that if lambda expressions are used to subscribe to an event, then this creates a weak reference to the event handler code, so it is not required to explicitly unsubscribe from the event ...

Weak event handler model for use with lambdas

OK, so this is more of an answer than a question, but after asking this question, and pulling together the various bits from Dustin Campbell, Egor, and also one last tip from the IObservable/Rx/...

Is there a way to specify an "empty" C# lambda expression?

I d like to declare an "empty" lambda expression that does, well, nothing. Is there a way to do something like this without needing the DoNothing() method? public MyViewModel() { SomeMenuCommand =...

C# Lambda expression -Help

I am learning lambda expression and delegates.While i try to execute the following ,I am getting error at the line which is marked bold line. (Error : Operator += cannot be applied to operands of ...

LINQ to append to a StringBuilder from a String[]

I ve got a String array that I m wanting to add to a string builder by way of LINQ. What I m basically trying to say is "For each item in this array, append a line to this StringBuilder". I can do ...

热门标签