TargetParameterCountException is thrown on a ToolStripMenuItem click

J

Justin Cherniak

I have a ToolStrip item which fires a function when clicked. The
function will run to completion without any problems (if I set a
breakpoint at the closing brace, no exception has been fired), but
once it returns, I get a TargetParameterCountException in mscorlib. I
cannot for the life of me figure out why and I'm hoping someone here
might be able to help.

Here is the relevant code (although I don't think it has any effect)


ToolStripMenuItem resetLib = new ToolStripMenuItem("Reset Library",
null, new EventHandler(ResetLibraryClick));

void ResetLibraryClick(object o, EventArgs e)
{
player.Stop();
player.Playlist = null;
library = new Library();
library.LibraryChanged += new
EventHandler(library_LibraryChanged);
library.Save();
Tracks = library.Tracks;
UpdateListboxes();
}

Thanks in advance,
Justin Cherniak
 
J

Justin Cherniak

The problem was found elsewhere in the code, so you can safely ignore
this post...

Thanks,
Justin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top