Invoke does not exist in the current context?

Posted by Pawan Kumar on Stack Overflow See other posts from Stack Overflow or by Pawan Kumar
Published on 2010-12-21T13:48:17Z Indexed on 2010/12/21 13:54 UTC
Read the original article Hit count: 315

Filed under:
|

Invoke does not exist in the current context. The same method was not giving any error in Form.cs class but when I used in other class in same project it gives error. i am using threading on forms control.

private void UpdateText(object fileName)
        {
            if (Textbox.InvokeRequired)
            {
                UpdateTextCallback back = new UpdateTextCallback(UpdateText);
                this.Invoke(back, new object[] { fileName }); 
            }
        }

© Stack Overflow or respective owner

Related posts about c#

Related posts about multithreading