Re: Documentation issues
Posted: Wed Mar 18, 2026 3:52 pm
Hi Kees,
That's not a "regular" delegate (which is a definition of a method's parameters and argument types), but an "anonymous" delegate, or anonymous method using the delegate syntax.
I suspect this was a language feature that was introduced earlier in c#, but later a better/cleaner feature was introduced, the one you used with the => operator, which is an anonymous method/lambda expression (creating a piece of code that can be called, without explicitly putting it in a method with a name).
So I think there's no point anymore using the delegate syntax, you can use the anonymous method syntax instead, which does the same thing and is easier to read. You can read some more about this here https://learn.microsoft.com/en-us/dotne ... e-operator
That's not a "regular" delegate (which is a definition of a method's parameters and argument types), but an "anonymous" delegate, or anonymous method using the delegate syntax.
I suspect this was a language feature that was introduced earlier in c#, but later a better/cleaner feature was introduced, the one you used with the => operator, which is an anonymous method/lambda expression (creating a piece of code that can be called, without explicitly putting it in a method with a name).
So I think there's no point anymore using the delegate syntax, you can use the anonymous method syntax instead, which does the same thing and is easier to read. You can read some more about this here https://learn.microsoft.com/en-us/dotne ... e-operator