C#控制台基础 VS2017中为控制台程序设置启动参数(string[] args)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39561376/article/details/78157630


代码:

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

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (var str in args) {
                Console.WriteLine(str);
            }

            Console.ReadKey();
        }
    }
}

设置启动参数:

       步骤一:


 

     步骤二:



运行程序:


猜你喜欢

转载自blog.csdn.net/qq_39561376/article/details/78157630