I would like to write a method that does some work and finally returns another method with the same signature as the original method. The idea is to process a stream of bytes depending on the previous byte value sequentially, without going into recursion. Calling it like this:
MyDelegate executeMethod = handleFirstByte
To pass a method, I want to assign them to a Func delegate. But I ran into the problem that this leads to a recursive declaration without completion ...
Func<byte, Func<byte, <Func<byte, etc... >>>
I somehow got lost here. How can I get around this?
c # delegates func
Marwie Jan 16 '15 at 17:17 2015-01-16 17:17
source share