共享一个从字符串转 Lambda 表达式的类(6)

前面我也说了不少了,这次把这个东西源代码拿出来,不做解释了。这里放几张图说明一下效果:

首先,这是用到的测试类:

namespace ConsoleLenic
{
    public class Person
    {
        public Person(long id, string name)
        {
            ID = id;
            Name = name;
        }
 
        public long ID { get; set; }
        public string Name { get; set; }
 
        public string Format()
        {
            return ID + " " + Name;
        }
    }
}

这是字符串转 Lambda 表达式展示:

QQ截图20120725103540

来个强悍点的:

QQ截图20120725110057

上面的这两张图,都可以用源码实现。

不写了,这个写疲了。

原文地址:https://www.cnblogs.com/lenic/p/2607879.html