Action<string> messagetarget; messagetarget = delegate(string s) { showmessage(s); }; //this.Invoke(messagetarget);
public void showmessage(string thid1) { lvc[0] = DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second; lvc[1] = thid1; listView2.Items.Add(new ListViewItem(lvc, 0)); }
Action<string> messagetarget; messagetarget = delegate(string s, string t) { showmessage(s, t); }; this.Invoke(messagetarget); public void showmessage(string thid1,string message1) { lvc[0] = DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second; lvc[1] = thid1; lvc[2] = message1; listView2.Items.Add(new ListViewItem(lvc, 0)); }
Error 10 Delegate 'System.Action<string>' does not take 2 arguments C:\Users\bibo\Desktop\KryptonFormProject1\KryptonFormProject1\Form1.cs 223 29 KryptonFormProject1
messagetarget
Action<string> messagetarget
Action<string,string> messagetarget
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)