.NET 2.0: Return a property value from an object dynamically

public static object GetObjectProperty(object o, string property)
{
return o.GetType().GetProperty(property).GetValue(o, null);
}


AKA the simplest reflection you can use. Right?

No comments: