How to declare lambda event handlers in VB.Net?

前端 未结 4 1311
盖世英雄少女心
盖世英雄少女心 2021-02-07 02:44

I believe the following VB.Net code is the equivalent of the proceeding C# code; however the VB.Net test fails - the event handling Lambda is never called.

What is going

4条回答
  •  情话喂你
    2021-02-07 03:16

    For those finding this question now: since Visual Basic 2010 (VB 10.0), anonymous Subs do work, so you can write something like:

    Sub() eventRaised = True
    

提交回复
热议问题