鸟语天空
Visual Studio命令行参数
post by:追风剑情 2017-6-30 9:55

示例:

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

namespace ArgTest
{
    class Program
    {
        static void Main(string[] args)
        {
            for (int i = 0; i < args.Length; i++)
                Console.WriteLine(args[i]);
            Console.Read();
        }
    }
}

运行测试

参数之间用空格隔开

2222.png

11111.png

如果参数中有空格,则需用引号括起来

44444.png

3333.png

评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容