private static ConstantExpression Constant(DynamicMetaObjectBinder binder) { Type t = binder.GetType(); while (!t.IsVisible) { t = t.BaseType; } return Expression.Constant(binder, t); }