List all fields:
private static void PrintAllFields(Type t)
{
FieldInfo[] fields = t.GetFields(BindingFlags.Static | BindingFlags.Public | BindingFlags.GetField | BindingFlags.Instance | BindingFlags.NonPublic);
foreach (FieldInfo fi in fields)
{
Tracer.InfoFormat("{0}={1}", fi.Name, fi.GetValue(null).ToString());
}
}
Parameter looks like:
public static class A7
{
public string Hello {get; set;} = "world";
}
PrintAllFields(typeof(A7));