gpt4 book ai didi

c# - 委托(delegate)类型不能转换匿名方法

转载 作者:太空宇宙 更新时间:2023-11-03 17:24:52 26 4
gpt4 key购买 nike

<分区>

在下一行“this.dgvReport.Invoke(delegate”)中出现错误

"Cannot convert anonymous method to type 'System.Delegate' because it is not a delegate type"

    public void FillProductGrid()
{
ProductSP productSP = new ProductSP();
DataTable dtbl = new DataTable();
string productname = "";
dtbl = productSP.StockReport(productname, this.cbxPrint.Checked);
this.dgvReport.Invoke(delegate
{
this.dgvReport.DataSource = dtbl;
});
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com