Have you ever try to get all properties from a Class/Type on the fly? the next snippet demonstrates how to query the class instance and retrieve the properties names and their respective values.
It goes like this...
This way you have a string returned like "propName1: valueProp1\n" and so on.
Reference: