I have been trying to use MethodInvoker to run a method but im not sure how to get the syntax right so it passes a string to the method. As of now I get this error when trying to build: C:\Documents and Settings\Administrator\Desktop\IRCb\frmServer.cs(590): Method 'IRCb.frmServer.RecieveCommand(string)' does not match delegate 'void System.Windows.Forms.MethodInvoker()'
ThanksCode:public void RecieveCommand(string Command) { Console.WriteLine(Command); } public void InvokeRecieve() { MethodInvoker MI = new MethodInvoker(RecieveCommand); this.BeginInvoke(MI); }![]()




Reply With Quote