console application Output Sscrren is disappear within 1 sec....

Dec 14 2009 8:22 AM
Hi Guys,

I am not able to see thee output of this console application .................
In this there is no error but once when we RUN the program the output screen is blink and within a second it will disappear.


using System;
using System.Collections;

public class SamplesArrayList
{
    public static void Main()
    {

        // Creates and initializes a new ArrayList.
        ArrayList myAL = new ArrayList();
        myAL.Add("Hello");
        myAL.Add("World");

        // Displays the properties and values of the ArrayList.
        Console.WriteLine("myAL");
        Console.WriteLine("    Count:    {0}", myAL.Count);
        Console.WriteLine("    Capacity: {0}", myAL.Capacity);
        Console.Write("    Values:");
        PrintValues(myAL);
    }

    public static void PrintValues(IEnumerable myList)
    {
        foreach (Object obj in myList)
        Console.Write("   {0}", obj);
        Console.WriteLine();
    }

}


Answers (1)