有人可以帮助我将其转换为VB

时间:2011-08-27 05:59:06

标签: c#

我尝试过在线转换器,但很糟糕。任何帮助表示赞赏。

// Set the event handler for when the application data object changes.
(Application.Current as ExecutionModelApplication.App).ApplicationDataObjectChanged +=
                    new EventHandler(MainPage_ApplicationDataObjectChanged);

3 个答案:

答案 0 :(得分:2)

试试这个,

AddHandler CType(Application.Current,ExecutionModelApplication.App).ApplicationDataObjectChanged, 
    AddressOf NameOfHandlerMethod

事件处理程序:

Proctected Sub NameOfHandlerMethod(sender as Object, E as EventArgs)
  .
End Sub

答案 1 :(得分:0)

也许

   AddHandler TryCast(Application.Current, ExecutionModelApplication.App).ApplicationDataObjectChanged, New EventHandler(AddressOf MainPage_ApplicationDataObjectChanged)

答案 2 :(得分:0)

AddHandler TryCast(Application.Current,ExecutionModelApplication.App).ApplicationDataObjectChanged,_
AddressOf MainPage_ApplicationDataObjectChanged