what is the use of ()=> in silverllight

后端 未结 4 1131
北海茫月
北海茫月 2020-12-11 08:58

Can you say what is the use of the ()=> and =>? I saw this in a code. I did not get any reference for this.

this.Dispatcher.B         


        
4条回答
  •  庸人自扰
    2020-12-11 09:46

    Check out this page http://codebetter.com/karlseguin/2008/11/27/back-to-basics-delegates-anonymous-methods-and-lambda-expressions/

    If you don’t have any parameters, like in our example, you use empty paranthesis:

    () => {…}

提交回复
热议问题