我使用以下代码显示OpenFileDialog
使用RoslynPad,它编译并运行,但没有出现对话框,因此代码段将永远运行:
#r "framework:Microsoft.WindowsDesktop.App"
using System.Windows.Forms;
var fd = new OpenFileDialog
{
Filter = "Solution files (*.sln)|*.sln"
};
if (fd.ShowDialog() == DialogResult.OK)
Console.WriteLine(fd.FileName);
OpenFileDialog
使用 RoslynPad的正确方法是什么?
环境:
- 操作系统:Windows 10 Pro 64 位 (2004)
- RoslynPad:由最新的 master 分支构建。
- .NET 核心:3.1.402