参考博文
未参考博文
用Emit技术替代反射
C# 之 反射性能优化1 及后续文章
核心代码
public class Property
{
private readonly PropertyGetter getter;
private readonly PropertySetter setter;
public string Name { get; private set; }
public PropertyInfo Info { get; private set; }
public Property(PropertyInfo propertyInfo)
{
if (propertyInfo == null) {
throw new NullReferenceException("属性不能为空");
}
this.Name = propertyInfo.Name;
this.Info = propertyInfo;
this.getter = new PropertyGetter(propertyInfo);
this.setter &#