Поиск по этому блогу

C# Command-Line Arguments

C# Command-Line Arguments
Program.cs
using System;
using System.IO;

namespace Application
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                Console.WriteLine("Could not find the file: {0}.", args[0]);
            }
            else
            {
                Console.WriteLine("No file was specified.");
            }
        }
    }
}