I have an abstract class
public abstract class PairingMethod : IPairingMethod
{
virtual string Name { get; } = "Default Pairing";
protected ICollection<IPlayer> PlayersToPair { get; set; }
protected PairingMethod(ICollection<IPlayer> players )
{
PlayersToPair = players;
}
public virtual void GeneratePairingsForRound(IRound round)
{
throw new System.NotImplementedException();
}
}
Now I've tried to create a combo box based on all types that derive from that base class above. I created the combo box, and it uses class names as items but then when the combo box change event is triggered I need to know which derived class was selected. Then i can create an instance of that class, for generating pairings.
I tried implementing my own combo box with PairingMethods as the items but can't get it to work.
Any ideas/ suggestions?
C