App2.Program.Main C# (CSharp) Метод

Main() статический приватный Метод

static private Main ( string args ) : void
args string
Результат void
        static void Main(string[] args)
        {
            var program = new Program();

            var tokenSource = new CancellationTokenSource();
            Console.CancelKeyPress += (sender, eventArgs) =>
                {
                    // NOTE: This cancelling logic does not work in the VS2010 debugger with .Net 4, but does fine otherwise
                    tokenSource.Cancel();
                    eventArgs.Cancel = true;
                };

            program.Run(tokenSource.Token, Console.WriteLine);
        }