C# 函数参数默认值

namespace 函数参数默认值
{
    class Program
    {   
        public static void Test(int i =100)
        {
            Console.WriteLine("{0}",i);
        }
        static void Main(string[] args)
        {
            Test();
            Test(222);
            Console.Read();
        }
    }
}

输出:100

   222

posted @ 2014-12-31 22:48  Unikanade  阅读(2881)  评论(0编辑  收藏  举报