我有一个具有以下签名的函数
public static void raiseEventtoForm(string message, Color fc, Color bc, int messageType,
EventLogEntryType eventType = EventLogEntryType.Information, bool frmSQL = false)
{
if(eventType != EventLogEntryType.Information && !frmSQL)
postEventLog(message, eventType);
MessageEvent(message, fc, bc, frmSQL);
}
但是当我尝试调用它并设置它时,我得到一个无效的参数传递,我尝试了以下方法。我究竟做错了什么?
ProgramEvents.raiseEventtoFrom("example", Color.Black, Color.White, frmSQL:true);
ProgramEvents.raiseEventtoFrom("example", Color.Black, Color.White, frmSQL:= true);
编辑:错误:没有重载需要 4 个参数
*这是 /facepalm 的情况,我错过了明显的