地址不工作
本文关键字:工作 地址 | 更新日期: 2023-09-27 17:58:29
我在c#到vb.net的转换中遇到问题,但AddHandler
对我不起作用。有人能帮忙吗?
this.ucSurveyWebControl.OnResponseRecieved += new MentorLogic.Engines.Zodiac.Web.OnResponseRecieved(ucSurveyWebControl_OnResponseRecieved);
VB.net代码:不工作
Me.ucSurveyWebControl.OnResponseRecieved += New MentorLogic.Engines.Zodiac.Web.OnResponseRecieved(ucSurveyWebControl_OnResponseRecieved)
AddHandler
示例,但不起作用
AddHandler MentorLogic.Engines.Zodiac.Web.OnResponseRecieved, AddressOf ucSurveyWebControl_OnResponseRecieved
BC32008
的错误消息:代理
'MentorLogic.Engines.Zodiac.Web.OnResponseRecieved' requires an 'AddressOf' expression or lambda expression as the only argument to its constructor.
error `BC30676`: 'OnResponseRecieved' is not an event of 'MentorLogic.Engines.Zodiac.Web'. Page Validation Complete
使用具体对象而不是类:
AddHandler Me.ucSurveyWebControl.OnResponseRecieved, AddressOf ucSurveyWebControl_OnResponseRecieved
试试这个:
AddHandler Me.ucSurveyWebControl.OnResponseRecieved, AddressOf ucSurveyWebControl_OnResponseRecieved