View Code
        public string  SearchByEntity(Type t,string columnName)
        {
            //获取t的类型名
            string typeFullName = t.Name;
            //根据类型名获构造一个实体
            Type BaseType = Type.GetType("GWT.OnlineSys.LinqData." + typeFullName);
            //获取实体的指定的属性的值
            return Convert.ToString(BaseType.GetType().GetProperty(columnName).GetValue(BaseType, null));
        }

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
  • 2021-07-10
  • 2021-05-17
猜你喜欢
  • 2022-12-23
  • 2021-11-11
  • 2021-08-15
  • 2021-08-06
  • 2021-10-22
相关资源
相似解决方案