Re: [ADVANCED-DOTNET] Using reflection to enumerate static fields
I got things working just after I sent this email. Here's the solution for anyone interested: FieldInfo[] fields = typeof(Ids).GetFields( BindingFlags.Public | BindingFlags.Static); foreach (FieldInfo field in fields) { // Now using GetValu
[ADVANCED-DOTNET] Using reflection to enumerate static fields
I have the following classes: public class IdDef { public IdDef(int id, bool hasA, bool hasB) { this.Id =id; this.HasA = hasA; this.HasB = hasB; } public int Id; public bool HasA; public bool HasB; } public class Ids { privat