API Method to easily get the properties of an object

You may find this interesting: http://blogs.msdn.com/b/ericgu/archive/2004/01/12/57985.aspx