当前位置: 代码迷 >> C# >> 可选参数:
  详细解决方案

可选参数:

热度:105   发布时间:2016-05-05 02:48:14.0
命名参数和可选参数

命名参数

 class Program    {        void SayHello(int a, float b, double c)        {            a = 1;            b = 2;            c = 3;        }        static void Main(string[] args)        {            Program p = new Program();            p.SayHello(c: 3, b: 34, a: 22);        }

 

可选参数:

 

  相关解决方案