.NET Programming
 

     
Pass and parse command line parameters in a .net Application

Keywords: .net command line parameters windows forms main form constructor

 

 
 

antabus 0 5

antabus hvad er det antabus snyd antabus under huden

        //Pass or Capture command line parameters in a .NET application C#

 

        // Modify Program.CS 

        // Old  -- Replace the old Main procedure with the new one below

        static class Program

        {

            /// <summary>

            /// The main entry point for the application.

            /// </summary>

            [STAThread]

            static void Main ()

            {

                Application.EnableVisualStyles();

                Application.SetCompatibleTextRenderingDefault(false);

                Application.Run();

            }

        }

        //New Main procedure

        static class Program

        {

            /// <summary>

            /// The main entry point for the application.

            /// </summary>

            [STAThread]

            static void Main (string[] args)

            {

                Application.EnableVisualStyles();

                Application.SetCompatibleTextRenderingDefault(false);

                Application.Run(new Form1(args));

            }

        }

 

       

        //Old Form Constructor -- Replace the Old Form Constructor with the new one below

        public Form1()

        {

        }

 

        //New  -- Replace the default form Constructor with a new one that

        // has the args parameter

        public Form1(string[] args)

        {

        }


 


 PTerryWave LLC      Return to Programming Listing
About