I have an open abstract class Clientwith two inheriting classes Customerand TimeWaster.
I created a drop-down menu on C# Windows Formswhich I would like to show in these two names as options: Customer and TimeWaster.
All I can imagine is to create a simple Listone that contains these two expressions, and then bind the list to combobox DataSource:
List<string> clientType = new List<string>()
{
"Customer",
"TimeWaster"
};
public frmClientScreen()
{
cmboxClientType.DataSource = clientType;
}
But this is not supported, because in the future I can add many other classes whose names I would like to display in the drop-down menu.
How to associate the class names in mine Visual Studio Solutionwith the items displayed in the combo box?