CSharp examples for System.Reflection:PropertyInfo
Get Property Value
using System.Reflection; using System.Linq; using System;//from w w w. ja va2 s. com public class Main{ public static Object GetPropertyValue(Object entity,string propertyName) { PropertyInfo property= entity.GetType().GetProperty(propertyName); return property.GetValue(entity, null); } }