Я переношу рабочий код с .NET4 на .NET2 (устройство WinCE).
Использование Action, не принимающего аргументов и не возвращающего значения, не разрешено в .NET2
ошибка компиляции на строке 5 ниже: 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