首先随便哪一个类举例子
public class User
{
....
public string name {get;set;}
public string phone {get;set;}
public string adress {get;set;}
}
然后在实例化之后,使用matchcolumn指定需要读取的属性
User user = new User()...
string matchcolumn = 'name';
string name = user.GetType().GetProperty(matchcolumn).GetValue(user).ToString();