我正在使用C#和Xamarin,当使用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 ();
}
}
}
我应该参考什么?
答案 0 :(得分:1)
EventHandler在System命名空间中定义:
using System;