bsp; }
取得属性的值
private static void ReflectionGetProperty(object objClass, string propertyName)
{
PropertyInfo infos = objClass.GetType().GetProperties();
foreach (PropertyInfo info in infos)
{
if (info.Name == propertyName && info.CanRead)
{
System.Console.WriteLine(info.GetValue(objClass, null));
}
}
}