Jar*_*lak 2 .net c# compiler-errors .net-4.5.2
我需要选择json文件.
public void LoadChartData()
{
var ofDialog = new System.Windows.Forms.OpenFileDialog { Filter = @"json (*.json)|*.json" };
if (ofDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{ }
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,编译此代码会返回错误(每次两次System.Windows.Forms):
Error CS0234 The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)
Run Code Online (Sandbox Code Playgroud)
如何处理这个错误?
在System.Windows.Forms程序中包含程序集(如建议的错误消息).
转到解决方案资源管理器,右键单击您的项目.然后单击添加引用.选择System.Windows.Forms并单击OK.
| 归档时间: |
|
| 查看次数: |
3692 次 |
| 最近记录: |