Skip to content

Instantly share code, notes, and snippets.

@DanielVF
Created July 28, 2008 18:25
Show Gist options
  • Save DanielVF/2931 to your computer and use it in GitHub Desktop.
Save DanielVF/2931 to your computer and use it in GitHub Desktop.
using System.Reflection;
using System.Collections;
public static void ShowProperties(Object myObject){
Hashtable PropertiesOfMyObject = new Hashtable();
Type t = myObject.GetType();
PropertyInfo[] pis = t.GetProperties();
for (int i=0; i<pis.Length; i++) {
PropertyInfo pi = (PropertyInfo)pis.GetValue(i);
Console.WriteLine(pi.Name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment