J'ai une méthode avec un paramètre out
, et je voudrais pointer un Action
ou Func
(ou un autre type de délégué).Puis-je avoir une Action <> ou Func <> avec un paramètre out?
Cela fonctionne très bien:
static void Func(int a, int b) { }
Action<int,int> action = Func;
Toutefois, cela ne
static void OutFunc(out int a, out int b) { a = b = 0; }
Action<out int, out int> action = OutFunc; // loads of compile errors
Ceci est probablement un double, mais la recherche de 'paramètre out' est pas particulièrement fructueuse.
double possible de [Func avec le paramètre out] (http://stackoverflow.com/questions/1283127/funct-with -out-parameter) –
nawfal