public HalloDelegate()
        {
            EinfacherDelegate meinDele           = EinfacheMethode;
            Action            meinDeleAlsAction  = EinfacheMethode;
            Action            meinDeleAlsAction2 = delegate() { Console.WriteLine("Hallo"); };
            Action            meinDeleAlsAction3 = () => { Console.WriteLine("Hallo"); };
            Action            meinDeleAlsAction4 = () => Console.WriteLine("Hallo");

            DelegateMitParameter deleMitPara     = MethodeMitPara;
            Action <string>      actionMitString = MethodeMitPara;
            DelegateMitParameter deleMitPara2    = delegate(string bla) { Console.WriteLine("Hallo" + bla); };
            DelegateMitParameter deleMitPara3    = (string bla) => { Console.WriteLine("Hallo" + bla); };
            DelegateMitParameter deleMitPara4    = (bla) => Console.WriteLine("Hallo" + bla);
            DelegateMitParameter deleMitPara5    = x => Console.WriteLine("Hallo" + x);

            CalcDelegate          calcDele  = Sum;
            Func <int, int, long> calcFunc  = Sum;
            Func <int, int, long> calcFunc2 = delegate(int a, int b) { return(a + b); };
            Func <int, int, long> calcFunc3 = (int a, int b) => { return(a + b); };
            Func <int, int, long> calcFunc4 = (a, b) => { return(a + b); };
            Func <int, int, long> calcFunc5 = (a, b) => a + b;

            List <string> liste = new List <string>();

            liste.Where(Filter);
            liste.Where(x => x.StartsWith("B"));
        }
Beispiel #2
0
        public HalloDelegate()
        {
            EinfacherDelegate meinDele           = EinfacheMethode; //meinDele.Invoke();
            Action            meinDeleAction     = EinfacheMethode;
            Action            meinDeleActionAno  = delegate() { Console.WriteLine("Hallo"); };
            Action            meinDeleActionAno2 = () => { Console.WriteLine("Hallo"); };
            Action            meinDeleActionAno3 = () => Console.WriteLine("Hallo");

            DelegateMitPara deleMitPara      = MethodeMitPara;
            Action <string> deleMitParaActio = MethodeMitPara;
            DelegateMitPara deleMitParaAno   = (string msg) => { Console.WriteLine(msg); };
            DelegateMitPara deleMitParaAno2  = (msg) => Console.WriteLine(msg);
            DelegateMitPara deleMitParaAno3  = x => Console.WriteLine(x);

            CalcDele calcDele = Minus;  //long res = calcDele.Invoke(4, 6);
            Func <int, int, long> calcFunc = Sum;
            CalcDele calcDeleAno           = (int x, int y) => { return(x * y); };
            CalcDele calcDeleAno2          = (x, y) => { return(x * y); };
            CalcDele calcDeleAno3          = (x, y) => x * y;

            List <string> texte = new List <string>();

            texte.Where(x => x.StartsWith("M"));
            texte.Where(Filter);
        }
Beispiel #3
0
        public HalloDelegate()
        {
            EinfacherDelegate meinDele              = EinfacheMethode;
            Action            meinDeleAlsAction     = EinfacheMethode;
            Action            meinDeleAlsActionAno  = delegate() { Console.WriteLine("Hallo Ano"); };
            Action            meinDeleAlsActionAno2 = () => { Console.WriteLine("Hallo"); };
            Action            meinDeleAlsActionAno3 = () => Console.WriteLine("Hallo");

            DelegateMitPara meinDelemitPara          = MethodeMitPara;
            Action <string> meinDelemitParaAlsAction = MethodeMitPara;
            DelegateMitPara meinDelemitParaAno       = (string name) => { Console.WriteLine($"Hallo {name}"); };
            Action <string> meinDelemitParaAno2      = (name) => Console.WriteLine($"Hallo {name}");
            Action <string> meinDelemitParaAno3      = x => Console.WriteLine($"Hallo {x}");

            CalcDelegate          calcDele     = Minus;
            Func <int, int, long> calcDeleFunc = Sum;
            CalcDelegate          calcDeleAno  = (int x, int y) => { return(x + y); };
            CalcDelegate          calcDeleAno2 = (x, y) => x + y;

            List <string> texten = new List <string>();

            texten.Where(x => x.StartsWith("b"));
            texten.Where(Filter);

            long re     = calcDeleFunc.Invoke(6, 78);
            long result = calcDele.Invoke(56, 777);
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele = EinfacheMethode;

            meinDele.Invoke();
            Action meinDeleAlsAction     = EinfacheMethode;
            Action meinDeleAlsActionAno  = delegate() { Console.WriteLine("HALLO"); };
            Action meinDeleAlsActionAno2 = () => { Console.WriteLine("HALLO"); };
            Action meinDeleAlsActionAno3 = () => Console.WriteLine("HALLO");

            meinDeleAlsActionAno3.Invoke();

            DelegateMitPara deleMitPara          = ZeigeText;
            Action <string> deleMitAlsAction     = ZeigeText;
            Action <string> deleMitAlsActionAno  = (string txt) => { Console.WriteLine(txt); };
            Action <string> deleMitAlsActionAno2 = (txt) => Console.WriteLine(txt);
            Action <string> deleMitAlsActionAno3 = x => Console.WriteLine(x);

            Calculator            calc     = MUlti;
            Func <int, int, long> calcFunc = MUlti;
            Calculator            calcAno  = (x, y) => { return(x + y); };
            Calculator            calcAno2 = (x, y) => x + y;

            long result = calc.Invoke(5, 9);

            List <string> texte = new List <string>();

            texte.Where(x => x.StartsWith("b"));
            texte.Where(Filter);
        }
Beispiel #5
0
        public HalloDelegate()
        {
            EinfacherDelegate meinDelete      = EinfacheMethode;
            Action            meineAction     = EinfacheMethode;
            Action            meineActionAno  = delegate() { Console.WriteLine("Hallo"); };
            Action            meineActionAno2 = () => { Console.WriteLine("Hallo"); };
            Action            meineActionAno3 = () => Console.WriteLine("Hallo");

            DelegateMitPara deleMitPara          = MethodeMitPara;
            Action <string> deleMitParaAlsAction = MethodeMitPara;
            Action <string> deleMitParaAlsAno    = (string txt) => { Console.WriteLine(txt); };
            Action <string> deleMitParaAlsAno2   = (txt) => Console.WriteLine(txt);
            Action <string> deleMitParaAlsAno3   = x => Console.WriteLine(x);

            CalcDelegate calc = Multi;
            //long rsult = calc.Invoke(4, 6);
            Func <int, int, long> calcAlsFunc = Sum;
            CalcDelegate          calcAno     = (a, b) => { return(a + b); };
            CalcDelegate          calcAno2    = (a, b) => a + b;

            List <string> texte = new List <string>();

            texte.Where(x => x.StartsWith("b"));
            texte.Where(Filter);

            // http://linq101.nilzorblog.com/linq101-lambda.php
        }
Beispiel #6
0
        public HalloDelegate()
        {
            if (MeinEvent != null)
            {
                MeinEvent("Hallo", DateTime.Now, 857575);
            }

            EinfacherDelegate meinDele         = EinfacheMethode;
            Action            meinDeleAlsActio = EinfacheMethode;
            EinfacherDelegate actionAno        = delegate() { Console.WriteLine("hallo"); };
            EinfacherDelegate actionAno2       = () => { Console.WriteLine("hallo"); };
            EinfacherDelegate actionAno3       = () => Console.WriteLine("hallo");

            DelegateMitPara meinDeleMitPara    = MethodeMitPara;
            Action <string> meinDeleAlsAction  = MethodeMitPara;
            Action <string> meinDeleAlsAction2 = (string peter) => { Console.WriteLine(peter); };
            Action <string> meinDeleAlsAction3 = (peter) => Console.WriteLine(peter);
            Action <string> meinDeleAlsAction4 = x => Console.WriteLine(x);

            CalcDelegate          meinCalc     = Minus;
            Func <int, int, long> meinCalc2    = Sum;
            CalcDelegate          meinCalcAno  = (x, y) => { return(x + y); };
            CalcDelegate          meinCalcAno2 = (x, y) => x + y;

            List <string> daten   = new List <string>();
            var           result  = daten.Where(Filter);
            var           resutl2 = daten.Where(x => x.StartsWith("F"));
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele              = HalloWelt;
            Action            meinDeleAlsAction     = HalloWelt;
            Action            meinDeleAlsActionAno  = delegate() { Console.WriteLine("AAAAHhh"); };
            Action            meinDeleAlsActionAno2 = () => { Console.WriteLine("AAAAHhh"); };
            Action            meinDeleAlsActionAno3 = () => Console.WriteLine("AAAAHhh");

            DelegateMitPara meinDeleMitPara          = HalloWeltMitPara;
            Action <string> meinDeleMitParaAlsAction = HalloWeltMitPara;
            DelegateMitPara meinDeleMitParaAno       = delegate(string s) { Console.WriteLine(s); };
            DelegateMitPara meinDeleMitParaAno2      = (string s) => { Console.WriteLine(s); };
            Action <string> meinDeleMitParaAno3      = (s) => Console.WriteLine(s);
            Action <string> meinDeleMitParaAno4      = x => Console.WriteLine(x);

            CalcDelegate          calcDele     = Minus;
            Func <int, int, long> calcAlsFunc  = Sum;
            CalcDelegate          calcDeleAno  = (x, y) => { return(x + y); };
            CalcDelegate          calcDeleAno2 = (x, y) => x + y;

            List <string> texte = new List <string>();

            texte.Where((x) => { return(x.StartsWith("b")); });
            texte.Where(x => x.StartsWith("b"));
            texte.Where(filter);
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele = EinfacheMethode;
            EinfacherDelegate meineAno = delegate() { Console.WriteLine("Hallo"); };

            Action meinDeleAlsActionAno  = () => { Console.WriteLine("Hallo"); };
            Action meinDeleAlsActionAno2 = () => Console.WriteLine("Hallo");

            Action meinDeleAlsAction = EinfacheMethode;


            DelegateMitPara deleMitPara       = MethodeMitPara;
            DelegateMitPara deleMitParaAno    = delegate(string mmm) { Console.WriteLine(mmm); };
            Action <string> deleMitParaAction = MethodeMitPara;
            DelegateMitPara deleMitParaAno2   = (x) => { Console.WriteLine(x); };
            Action <string> deleMitParaAno3   = (x) => Console.WriteLine(x);
            DelegateMitPara deleMitParaAno4   = x => Console.WriteLine(x);

            CalcDelegate          calcDele      = Minus;
            Func <int, int, long> calcAlsFunc   = Minus;
            CalcDelegate          calcDeleFunc  = (x, y) => { return(x + y); };
            CalcDelegate          calcDeleFunc2 = (x, y) => x + y;

            var lll = new List <string>();

            lll.Where(x => x.StartsWith("B"));
            lll.Where(Filter);
        }
Beispiel #9
0
        public HalloDelegate()
        {
            EinfacherDelegate meinDele          = EinfacheMethode;
            Action            meinDeleAlsAction = EinfacheMethode;

            Action meinDeleAlsActionAno  = delegate() { Console.WriteLine("Hallo"); };
            Action meinDeleAlsActionAno2 = () => { Console.WriteLine("Hallo"); };
            Action meinDeleAlsActionAno3 = () => Console.WriteLine("Hallo");

            deleMitPara = MethodeMitPara;
            Action <string> deleMitParaAlsAction = MethodeMitPara;
            DelegateMitPara deleMitParaAno       = (string txt) => { Console.WriteLine(txt); };
            DelegateMitPara deleMitParaAno2      = (txt) => Console.WriteLine(txt);
            DelegateMitPara deleMitParaAno3      = x => Console.WriteLine(x);

            CalcDelegate          calcDele     = Multi;
            Func <int, int, long> calcFunc     = Sum;
            Func <int, int, long> calcFuncAno  = (int a, int b) => { return(a + b); };
            Func <int, int, long> calcFuncAno2 = (a, b) => { return(a + b); };
            Func <int, int, long> calcFuncAno3 = (a, b) => a + b;

            Predicate <string> immerBool = ImmerBool;

            List <string> texte = new List <string>();

            texte.Where(x => x.StartsWith("b"));
            texte.Where(Filter);
        }
        public HalloDelegate()
        {
            EinfacherDelegate dings           = EinfacheMethode;
            Action            dingsAlsAction  = EinfacheMethode;
            Action            dingsAlsAction2 = delegate() { Console.WriteLine("Hallo"); };
            Action            dingsAlsAction3 = () => { Console.WriteLine("Hallo"); };
            Action            dingsAlsAction4 = () => Console.WriteLine("Hallo");


            DelegateMitParameter deleMP        = ZeigeText;
            Action <string>      deleMPAction  = ZeigeText;
            Action <string>      deleMPAction2 = (string x) => Console.WriteLine(x);
            DelegateMitParameter deleMPAction3 = (x) => Console.WriteLine(x);
            Action <string>      deleMPAction4 = x => Console.WriteLine(x);
            Action <string>      deleMPAction5 = Console.WriteLine;

            CalcDelegate          calcDele     = Sum;
            Func <int, int, long> calcDeleFunc = Sum;
            CalcDelegate          calcDele2    = (int x, int y) =>
            {
                return(x + y);
            };

            CalcDelegate calcDele3 = (x, y) => x + y;

            var texte = new List <string>();
            var allesWasMitBAnfängt   = texte.Where(x => x.StartsWith("b"));
            var allesWasMitBAnfängt22 = texte.Where(Filter);
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele        = EinfacheMethode;
            Action            meineAction     = EinfacheMethode;
            Action            meineActionAno  = delegate() { Console.WriteLine("Halölo"); };
            Action            meineActionAno2 = () => { Console.WriteLine("Hallo"); };
            Action            meineActionAno3 = () => Console.WriteLine("Hallo");

            DelegateMitPara deleMitPara       = MethodeMitPara;
            Action <string> deleMitParaAction = MethodeMitPara;
            DelegateMitPara deleMitParaAno    = (string msg) => { Console.WriteLine(msg); };
            DelegateMitPara deleMitParaAno2   = (msg) => Console.WriteLine(msg);
            DelegateMitPara deleMitParaAno3   = x => Console.WriteLine(x);

            CalcDelegate          calc     = Multi;
            Func <int, int, long> calcFunc = Sum;
            CalcDelegate          calcAno  = (x, y) => { return(x + y); };
            CalcDelegate          calcAno2 = (x, y) => x + y;

            var text = new List <string>();

            text.Where(x => x.StartsWith("b"));
            text.Where(Filter);

            long res = calc.Invoke(1, 5);
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele           = EinfacheMethode;
            Action            meinDeleAlsAction  = EinfacheMethode;
            Action            meinDeleAlsAction2 = () => { Console.WriteLine("Hallo"); };

            DeleMitPara     meinDeleMitPara          = MethodeMitPara;
            Action <string> meinDeleMitParaAlsAction = MethodeMitPara;
            DeleMitPara     meinDeleMitPara2         = x => Console.WriteLine(x);

            CalcDele meinCalc = Minus;
            long     rsult    = meinCalc.Invoke(4, 5);
            Func <int, int, long> calcFunc = Sum;
            CalcDele meinCalc2             = (x, y) => { return(x / y); };
            CalcDele meinCalc3             = (x, y) => x / y;

            List <string> texte = new List <string>();


            var result  = texte.Where(Filter);
            var result2 = texte.Where(x => x.StartsWith("b")).OrderBy(x => x.Length).Take(3);
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele          = EinfacheMethode;
            Action            meinDeleAlsAction = EinfacheMethode;
            Action            meinDeleAno       = delegate() { Console.WriteLine("Ahllo"); };
            Action            meinDeleAno2      = () => { Console.WriteLine("Ahllo"); };
            Action            meinDeleAno3      = () => Console.WriteLine("Ahllo");

            DelegateMitPara deleMitPara              = MethodeMitPara;
            Action <string> deleMitParaAslAction     = MethodeMitPara;
            Action <string> deleMitParaAslActionAno  = (string x) => { Console.WriteLine(x); };
            Action <string> deleMitParaAslActionAno2 = x => Console.WriteLine(x);

            CalcDelegate          calcDele         = Minus;
            Func <int, int, long> calcDeleFunc     = Sum;
            Func <int, int, long> calcDeleFuncAno  = (a, b) => { return(a + b); };
            Func <int, int, long> calcDeleFuncAno2 = (a, b) => a + b;

            List <string> lala = null;

            lala.Where(Filter);
            lala.Where(x => x.StartsWith("b"));
        }
        public HalloDelegates()
        {
            EinfacherDelegate meinDings              = EinfacheMethode;
            Action            meinDingsAlsAction     = EinfacheMethode;
            Action            meinDingsAlsActionAno  = delegate() { Console.WriteLine("Hallo"); };
            Action            meinDingsAlsActionAno2 = () => { Console.WriteLine("Hallo"); };
            Action            meinDingsAlsActionAno3 = () => Console.WriteLine("Hallo");

            MitParameterDelegate paraDele               = ZeigeText;
            Action <string>      paraDeleAlsAxction     = ZeigeText;
            Action <string>      paraDeleAlsAxctionAno  = (string txt) => { Console.WriteLine(txt); };
            Action <string>      paraDeleAlsAxctionAno2 = x => Console.WriteLine(x);

            CalcDelegate          calc       = Minus;
            Func <int, int, long> calcAsFunc = Sum;
            CalcDelegate          calcAno    = (a, b) => { return(a + b); };
            Func <int, int, long> calcAno2   = (a, b) => a + b;

            var texte = new List <string>();

            texte.Where(Filter);
            texte.Where(lala => lala.StartsWith("B")).OrderBy(x => x.Length);
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDings           = EinfacheMethode;
            Action            meinDingsAlsAction  = EinfacheMethode;
            Action            meinDingsAlsAction2 = delegate() { Console.WriteLine("Hallo"); };
            Action            meinDingsAlsAction3 = () => { Console.WriteLine("Hallo"); };
            Action            meinDingsAlsAction4 = () => Console.WriteLine("Hallo");

            DelegateMitParameter dingsMitPara           = MethodeMitPara;
            Action <string>      dingsMitParaAlsAction  = MethodeMitPara;
            Action <string>      dingsMitParaAlsAction2 = delegate(string txt) { Console.WriteLine(txt); };
            Action <string>      dingsMitParaAlsAction3 = (string txt) => Console.WriteLine(txt);
            Action <string>      dingsMitParaAlsAction4 = x => Console.WriteLine(x);

            CalcDelegate          calcDele      = Sum;
            Func <int, int, long> calcDeleFunc  = Sum;
            Func <int, int, long> calcDeleFunc2 = delegate(int a, int b) { return(a + b); };
            Func <int, int, long> calcDeleFunc3 = (a, b) => { return(a + b); };
            Func <int, int, long> calcDeleFunc4 = (a, b) => a + b;

            List <string> text = new List <string>();
            var           res  = text.Where(Filter);
            var           res2 = text.Where(x => x.StartsWith("b"));
        }
        public HalloDelegate()
        {
            EinfacherDelegate meinDele               = EinfacheMethode;
            Action            meineDeleAlsAction     = EinfacheMethode;
            Action            meineDeleAlsActionAno  = delegate() { MessageBox.Show("Test"); };
            Action            meineDeleAlsActionAno2 = () => { MessageBox.Show("Test"); };
            Action            meineDeleAlsActionAno3 = () => MessageBox.Show("Test");

            DeleMitParameter deleMitPara        = MethodeMitPara;
            Action <string>  deleMitParaAls     = MethodeMitPara;
            Action <string>  deleMitParaAlsAno  = (string txt) => { MessageBox.Show(txt); };
            Action <string>  deleMitParaAlsAno2 = (txt) => MessageBox.Show(txt);
            Action <string>  deleMitParaAlsAno3 = x => MessageBox.Show(x);

            CalcDelegate          calcDele        = Sum;
            Func <int, int, long> calcAlsFunc     = Sum;
            Func <int, int, long> calcAlsFuncAno  = (int a, int b) => { return(a + b); };
            Func <int, int, long> calcAlsFuncAno2 = (a, b) => a + b;

            List <string> texte = new List <string>();

            texte.Where(Filter);
            texte.Where(x => x.StartsWith("b"));
        }