我在 Xamarin 中使用 C#,在使用 EventHandler 时,出现此错误:
The type or namespace name 'EventHandler' could not be found(are you missing a using dirrective or an assembly reference?)(CS0246)
这是我的代码:
using Emgu.CV;
using Emgu.CV.UI;
using Emgu.CV.Structure;
using System.Drawing;
using System.Windows.Forms;
namespace Emgu_Hello_World
{
public class EmptyClass
{
public static void Main(string[] args)
{
ImageViewer viewer = new ImageViewer ();
Capture capture = new Capture ();
Application.Idle += new EventHandler (delegate(object sender, EventArgs e) {
viewer.Image = capture.QueryFrame ();
});
viewer.ShowDialog ();
}
}
}
我应该参考什么?