I'm porting working code from .NET4 to .NET2 (a WinCE device).
The usage of Action taking no arguments and returning no value isn't allowed in .NET2
compile error on line 5 below: Using the generic type 'System.Action' requires '1' type arguments
Workaround thoughts?
//first state is the default for the system
public enum States { EnterVoucherCode, EnterTotalSale, ProcessVoucher };
public enum Events { PressNext, PressRedeem, ProcessSuccess, ProcessFail, PressBackToVoucherCode };
public States State { get; set; }
private Action[,] fsm; //Fails to compile here
public FiniteStateMachine()
{
//array of action delegates
fsm = new Action[3, 5] {
//PressNext, PressRedeem, ProcessSuccess, ProcessFail, PressBackToVoucherCode