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
请按任意键继续. . .
*/
}
}
标签:ExitDefaultVal,Console,Jim,DefValue,System,Hi,WriteLine
From: https://blog.51cto.com/gjwrxz/6322262