相关疑难解决方法(0)

可选参数必须出现在c#中的所有必需参数之后

方法1

public List<IndentItems> GetIndentsByStatus(string projectAddress, string jobAddress, string currentStatus,string ddlevent)    
{    
    List<IndentItems> indentItems =null;
    indentItems = GetIndentFilledInfo(filterdReports, false,null ,ddlevent);
    return indentItems;    
}
Run Code Online (Sandbox Code Playgroud)

方法2

public List<IndentItems> GetIndentFilledInfo(List<SurveyFeedback> surveyFeedbacks, bool hasupdate, string indentType = null,string ddlevent)    
{
}
Run Code Online (Sandbox Code Playgroud)

从Method1我调用第二个方法,在method2中EventID我将获取数据.但它显示编译器错误消息:

CS1737:可选参数必须出现在所有必需参数之后.

c# optional-parameters

0
推荐指数
2
解决办法
2万
查看次数

标签 统计

c# ×1

optional-parameters ×1