码迷,mamicode.com
首页 > 其他好文 > 详细

参数可传可不传

时间:2018-07-10 11:30:57      阅读:133      评论:0      收藏:0      [点我收藏+]

标签:har   highlight   str   一个   table   opera   ble   sharp   ice   

遇到的就是一个方法里,可传一个也行,传两个也行

 public static DataTable GetInvoiceByTime(string Operation, string OrderSn=null)
        {}
后面的OrderSn在调用这个方法的时候,就可填可不填了。
在调用的时候只填写前面的一个就可以用,也不要抱错

 OrderData.GetInvoiceByTime("Time");

  

参数可传可不传

标签:har   highlight   str   一个   table   opera   ble   sharp   ice   

原文地址:https://www.cnblogs.com/ZkbFighting/p/9287197.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!