From http://stackoverflow.com/questions/852181/c-printing-all-properties-of-an-object