I'm trying to implement a generic function, Let's say we have Modes & it's corresponding Sub modes
Now what I have done was I've created an Enum for Modes
public enum Modes
{
ModeA,
ModeB,
ModeC
}
and similarly for SubModes,
public enum SubModesA
{
SubModeA1,
SubModeA2,
SubModeA3
}
public enum SubModesB
{
SubModeB1,
SubModeB2
}
public enum SubModesC
{
SubModeC1,
SubModeC2,
SubModeC3
}
Now my question is, How to implement a Method(it could be a generic) which takes in Mode
as one input, Sub Modes
as second input, please note that the second input(Sub Modes) has to be based on first input,
(Ex. Public void PerformOperation(Modes mode, SubModes subMode){};
any ideas please?