我的场景:
我已经宣布(课外)代表:
public delegate void add_row_item(string category, string name, string address, string locality, string cap, string tel, string fax, string www, string email_results, string business_url, string map_query, DataGridView table);
然后我有这个函数在主窗体上向我的 datagridview 添加行
public void update_add_row_item(string category, string name, string address, string locality, string cap, string tel, string fax, string www, string email_results, string business_url, string map_query, DataGridView table)
{
table.Rows.Add(category, name, address, locality, cap, tel, fax, www, email_results, business_url, map_query);
}
但是当我在任务中调用方法时,我得到一个“预期的方法名称”错误:
results_grid.Invoke(new add_row_item(update_add_row_item(category, name, address, locality, cap, tel, fax, www, email_results, business_url, map_query, results_grid)));
我的代码有什么问题?谢谢!