首页 > 其他分享 >ExitDefaultVal

ExitDefaultVal

时间:2023-05-22 11:32:14浏览次数:37  
标签:ExitDefaultVal Console Jim DefValue System Hi WriteLine

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

相关文章