static void Main(string[] args) { var cls = new DictionaryLines().GetType(); var attrs = cls.GetFields(BindingFlags.NonPublic | BindingFlags.Instance); foreach (var k in attrs) { Console.WriteLine("----------------------" + k.Name + "------------------------------"); foreach (var j in (Dictionary <string, string>)k.GetValue(new DictionaryLines())) { Console.WriteLine("Key = " + j.Key + " & Value = " + j.Value); } } Console.Read(); }
static void Main(string[] args) { var cls = new DictionaryLines().GetType(); var attrs = cls.GetFields(BindingFlags.NonPublic | BindingFlags.Instance); }