Beispiel #1
0
	public static int Main(string[] args)
	{

        ArrayInit ai = new ArrayInit();
        TestFramework.BeginTestCase("Exception thrown in default ctor of a valuetype during Array.Initialize");
        if (ai.RunTests())
            return 100;
        else
            return 0;
	}
Beispiel #2
0
    public static int Main(string[] args)
    {
        ArrayInit ai = new ArrayInit();

        TestFramework.BeginTestCase("Exception thrown in default ctor of a valuetype during Array.Initialize");
        if (ai.RunTests())
        {
            return(100);
        }
        else
        {
            return(0);
        }
    }
Beispiel #3
0
        static void Main(string[] args)
        {
            Dictionary <int, string> dicOptions = new Dictionary <int, string>()
            {
                { 1, "Keywords Test - SingleStep Debug" },
                { 2, "Keywords Test - ForceCast" },
                { 3, "Keywords Test - Arglist Example" },

                { 4, "Enumerable Emulation" },

                { 5, "Array Init" },

                { 6, "IndexInit" },

                { 7, "Interface object" },

                { 8, "Tuple Deconstruction" },
            };


            foreach (var kvp in dicOptions)
            {
                Console.WriteLine(kvp.Key + "......" + kvp.Value);
            }
            Console.WriteLine(new string('.', 80));

            if (int.TryParse(Console.ReadLine(), out var optionChosen))
            {
                switch (optionChosen)
                {
                case 1: { Keywords.Test1(); break; }

                case 2: { Keywords.Test_ForceCastEx(); break; }

                case 3: { Keywords.Test_ArglistEx(); break; }

                case 4: { EnumerableEmulation.Test(); break; }

                case 5: { ArrayInit.Test(); break; }

                case 6: { IndexInit.Test(); break; }

                case 7: { DefInterface.Test(); break; }

                case 8: { TupleDeconstruction.Test(); break; }
                }
            }
            Console.WriteLine(new string('.', 80));
            Console.ReadKey();
        }