oentoro
oentoro

Reputation: 750

The type or namespace name 'EventHandler' could not be found

I am using C# with Xamarin, when using EventHandler, I got this error:

The type or namespace name 'EventHandler' could not be found(are you missing a using dirrective or an assembly reference?)(CS0246)

Here is my code:

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

What should I referenced to?

Upvotes: 3

Views: 7627

Answers (1)

fcuesta
fcuesta

Reputation: 4520

EventHandler is defined in System namespace:

   using System;

Upvotes: 4

Related Questions