C# GetType()
2017-09-29 15:17 FingalZhu 阅读(293) 评论(0) 编辑 收藏 举报T model = new T();
PropertyInfo[] propertys = model.GetType().GetProperties();
foreach (PropertyInfo pi in propertys)
{
if (type == typeof(object))//T是dymamic
{
type = datasource.FirstOrDefault().GetType();
}