我的小站

制作可以从外面传递参数的exe程序比较简单的例子

以前还以为很神奇呢 今天试了一下发现比较简单吧

下面展示一下

代码文件

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

namespace TestExePara
{
    class Program
    {
        static void Main(string[] args)
        {
            string strSum = string.Empty;
            foreach (string str in args)
            {
                strSum = strSum + str+"|";
            }
            Console.WriteLine(strSum);
        }
    }
}

生成的文件放在E盘debug目录下

执行的效果

posted @ 2013-05-30 18:03  nilz  阅读(260)  评论(0编辑  收藏  举报
我的小站