public A For<A>(Action<A> propertySpecifier,ViewPage page) where A : T
{
A t=(A)Activator.CreateInstance(typeof(A), page);
propertySpecifier(t);
_columns.Add(t);
return t;
}
2、不带参数:
复制代码 代码如下:
public A For<A>(Action<A> propertySpecifier) where A : T,new()
{
A t = new A();
propertySpecifier(t);