当我将参数传递给显示错误的方法时 [英] When I am passing parameters to the method showing an error

查看:98
本文介绍了当我将参数传递给显示错误的方法时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





静态RptInvoicePrint报告=新RptInvoicePrint();





当我将参数值传递给下面显示错误的方法时



方法:public static object setRptLogInfo(ref ReportDocument crpt,string rptTbl)

{

}





传递值:setRptLogInfo(报告,RAD_SP_INV_RPTPRINTINVOICE; 1 ); $





错误:Radar5C.Classes.PrintInvoice.setRptLogInfo的最佳重载方法匹配(参考CrystalDecisions.CrystalReports.Engine.ReportDocument ,string)有一些无效的论点





请帮我解决这个问题。

Hi,

static RptInvoicePrint report = new RptInvoicePrint();


When i am passing parameter values to the below method showing error

Method: public static object setRptLogInfo(ref ReportDocument crpt, string rptTbl)
{
}


Passing Values : setRptLogInfo( report, "RAD_SP_INV_RPTPRINTINVOICE;1");


Error: The best overloaded method match for Radar5C.Classes.PrintInvoice.setRptLogInfo(ref CrystalDecisions.CrystalReports.Engine.ReportDocument, string) has some invalid arguments


Please help me in solving this.

推荐答案

您的方法签名:

Your method signature:
public static object setRptLogInfo(ref ReportDocument crpt, string rptTbl)



将第一个参数显示为ref值。所以尝试:


Shows the first parameter as a ref value. So try:

setRptLogInfo(ref report, "RAD_SP_INV_RPTPRINTINVOICE;1");


这篇关于当我将参数传递给显示错误的方法时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆