Beispiel #1
0
        //public void MyThing(Expression<Func<string, bool>> myFunc)
        //{
        //    myFunc.Parameters.Select(p => p.)

        //    myFunc.Compile()("foo");
        //}

        public LinqPlayground()
        {
            var thridItem = List.Where(x => x.MyId == 3).ToList();

            var firstItem = List.Where(x => x.MyName.Equals("MyItem1")).ToList();

            var yours = new YourItem
            {
                MyId         = 100,
                MyBool       = false,
                MyName       = "Testies",
                SecretNumber = 42
            };

            var nowMine = MapYourItemToMine(yours);

            var nowMine1 = yours.MapYourItemToMine1();

            var s = "stuff";

            s.MutateString();


            MyThing(s3 => string.IsNullOrEmpty(s3));
        }
Beispiel #2
0
        public MyItem MapYourItemToMine(YourItem yours)
        {
            var temp = new MyItem
            {
                MyId   = yours.MyId,
                MyBool = yours.MyBool,
                MyName = yours.MyName
            };

            return(temp);
        }