【发布时间】:2019-01-27 12:54:49
【问题描述】:
在 WPF C# 项目的以下 if 条件块上,语法中收到错误:“Operator '==' cannot be applied to operands of bool? and System.Windows.Forms.DialogResult”
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
Logic......
}
代码有什么问题?我正在使用 VS2013
【问题讨论】:
-
dlg是什么类型? (顺便说一句 WPF 不是 WinForms,你似乎混淆了两者)。 -
你背后的逻辑是什么?
标签: c# .net wpf visual-studio