请高手 帮小弟看看 只是一个简单的调用方法 为什么提示 有一些无效参数
public double Balance(bool bType, string cDWCode)
		{
            
return Balance(bType, cDWCode, null);
		}
		public double Balance(bool bType, string cDWCode, System.DateTime dEndDate, System.Data.Common.DbCommand cmd = null)
		{
			str = "select iBalance from CustomerVendor where cDWCode='" + cDWCode + "' and bType=" + DataBase.getBoolean(bType);
			string WhereDate;
			if (dEndDate != null) {
				WhereDate = " and dDate<" + DataBase.getDate(dEndDate);
			}
			
			}
			return iBalance;
		}
              
------解决方案--------------------System.DateTime dEndDate 
这是个结构体,传参数不能用null
------解决方案--------------------根据你的业务,给个时间就行。如果是默认值可以用DateTime.Now。
看函数这个时间应该是界面输入的。
------解决方案--------------------public double Balance(bool bType, string cDWCode, 
System.DateTime? dEndDate, System.Data.Common.DbCommand cmd = null)
 {
这样可以 
  System.DateTime?  代表可空类型