Is it possible to get a list of class name of Parent
and list of the field names in class ChildA
:
I created this class to define the configuration codes (because I don't want to use string, it is not stable and difficult to manage):
public class CodeConfiguration
{
public class ModuleA
{
public const string GroupA = "ProvinCode";
public const string GroupB = "CountryCode";
}
public class ModuleB
{
public const string GroupC = "ImportStatus;
public const string GroupD = "ExecuteStatus";
}
}
In database, my data table is as below
Module Group Code Name
ModuleA GroupA 1 100
ModuleA GroupB 2 1001
ModuleB GroupC 1 Imported
ModuleB GroupD 2 Failed
So now I need to get data for Module
Combobox and Group
Combobox
My expected result:
Module Combobox: {"ModuleA","ModuleB}
Group Combobox of Module A: {"GroupA","GroupB"}