I'm a dot net developer, and i have a problem with anonymous methods i used i this code. void
{
SuspendLayout();
if (InvokeRequired)
{
WaitCallback w = delegate(object o)
{
Text = gestor.Titulo;
};
Invoke(w);
}else
{
Text = gestor.Titulo;
}
ResumeLayout();
}
But sometimes the application thow me a NullRefererenceException in Invoke(w), and the stack is in there,
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at AlbumFotografico.Principal.OnTituloCambio(Object sender, EventArgs e) in C:\csharp\02\AlbumFotografico\Principal.cs:line 450.
So what happend here, whan i'm doing wrong?
Thanks a lot. Luis.
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.