ExitDefaultVal

来源:互联网 发布:php手机板块 编辑:程序博客网 时间:2024/06/03 14:52

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ExitDefaultVal
{
    class Program
    {
        static void DefValue(string a="Hi",string b="Jim")
        {
            Console.WriteLine(a+"  "+b);
        }
        static void Main(string[] args)
        {
            Console.WriteLine("AAAAA");
            DefValue();
            DefValue("hello");
            DefValue(b: "Tom");
            Environment.Exit(2);
            Console.WriteLine("BBBBB");
        }
        /*
        AAAAA
        Hi  Jim
        hello  Jim
        Hi  Tom
        请按任意键继续. . .        
         */
    }
}

0 0
原创粉丝点击