Take an object of type object returning its Shape property as an example.
/// <summary> /// Returns the specified property of the Object object /// </summary> /// <param name="obj">Incoming object</param> /// <returns>Returned properties</returns> private GeoJSON.Net.Geometry.Point GetShape(object obj) { System.Reflection.PropertyInfo a = null; foreach (System.Reflection.PropertyInfo pi in obj.GetType().GetProperties()) { if (pi.CanWrite) { if (0 == string.Compare("Shape", pi.Name, true)) { a = pi; break; } } } if (null == a) { return null; } return a.GetValue(obj) as GeoJSON.Net.Geometry.Point; }