尝试使用各种在线转换器将此代码转换为 VB.NET,但均无效(事件处理程序声明出错)。我正在使用 VS 2012 和 .Net 4.5。有任何想法吗?
readonly Action<IDialogManager, Action<bool>> closeCheck;
public void Execute(ActionExecutionContext context) {
closeCheck(Shell.Dialogs, result => Completed(this, new ResultCompletionEventArgs { WasCancelled = !result }));
}
public event EventHandler<ResultCompletionEventArgs> Completed = delegate { };