private void Lambdas()
        {
            Response.Write("LambdaExample" + "<br />");
            var example = new LambdaExample();

            foreach (TeamDTO team in example.GetTeamsThatStarWithB())
            {
                Response.Write(team.TeamName + "<br />");
            }
        }
Esempio n. 2
0
        private static void LambdaSample()
        {
            LambdaExample myLambda = new LambdaExample();

            Console.WriteLine(myLambda.MyLambdaOne(5));
            Console.WriteLine(myLambda.MyLambdaOne(6));
            Console.WriteLine(myLambda.MyLambdaOne(7));
            Console.WriteLine(myLambda.MyLambdaOne(8));
            Console.WriteLine(myLambda.MyLambdaOne(9));
            Console.WriteLine(myLambda.MyLambdaOne(10));
        }
Esempio n. 3
0
        static void DisplayLambdaExpressions()
        {
            int test = -1;

            while (test != 0)
            {
                Console.ForegroundColor = ConsoleColor.DarkCyan;
                Console.Write("Lambdas - Enter exercise no: (1 to 4) ");
                string input = Console.ReadLine();

                Console.Clear();
                int.TryParse(input, out test);
                Console.ForegroundColor = ConsoleColor.Green;
                switch (test)
                {
                case 0:
                    break;

                case 1:
                    LambdaExample lmbd = new LambdaExample("ex. 1.1");
                    break;

                case 2:
                    Console.WriteLine("Not implemented!");
                    break;

                case 3:
                    Console.WriteLine("Not implemented!");
                    break;

                case 4:
                    Console.WriteLine("Not implemented!");
                    break;

                default:
                    Console.WriteLine("Not implemented!");
                    break;
                }
            }
        }
Esempio n. 4
0
        private static void LambdaSample()
        {
            LambdaExample myLambda = new LambdaExample();

            Console.WriteLine(myLambda.myLambdaOne(5));
        }