Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
func1 and func 2 are delegates, a type that represent a calling site (a method somewhere).
It's like pointer of function in C/C++, but delegates in C# posses more informations than that (the instance of the object for non static method, ...)
This feature is used in many scenario: Event manamgement, Linq (to object), ...
If compiler produce a binary and the binary works, that's clearly legal.
But, as you don't put parenthesis on a variable, it's better to use Invoke() to clarify the context.
What do you mean by "legal"?
It's just a very spectacular way of solving this issue, but would never found a way into any prod code,
due it's complexity.
But it works for sure and is correct nontheless. :)
Is it legal?
This conditional operator returns function, so second pair of empty parenthesis needed to call returned function.
I know about conditional operator. I want to know how it works with function and why second pair of empty parenthesis needed.
This comment is hidden because it contains spoiler information about the solution
Can somebody please direct me do documentation describing this feature?
(Y)