3

我在 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 ();
        }
    }
}

我应该参考什么?

4

1 回答 1

4

EventHandler 在 System 命名空间中定义:

   using System;
于 2013-08-07T03:29:13.457 回答