Beam.Example.SimpleArray.Program.Main C# (CSharp) Метод

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

static private Main ( Array args ) : void
args Array
Результат void
        static void Main(string[] args)
        {
            // initialize the array with 10 elements
            double[] listValue = new double[10];

            // print header
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine(" Enter Ten Values For an Array.");

            // start loop - enter values into array
            Console.WriteLine();
            for (int iCount = 0; iCount < 10; iCount++)
            {
                Console.Write(" Enter Value ..: ");
                listValue[iCount] = Convert.ToDouble(Console.ReadLine());
            }
            // end loop

            // print array values in reverse order
            Console.WriteLine("");
            Console.WriteLine(" The values in reverse order are:");

            // start loop
            for (int oCount = 10 - 1; oCount >= 0; oCount--)
            {
                Console.WriteLine(" {0}", listValue[oCount]);
            }
            // end loop

            // print footer
            Console.WriteLine("\nFinished");

        } // end Main Method
Program