How does func ACTUALLY work
c#, func
Solution
A `Func` is a delegate -- a type of object that is associated with a specific method signature and is usually bound to a specific method with that signature. This might be either a `static` or an instance method and it might be generic or not; in all cases, the delegate instance holds all the information required to call the method.
Problem
So when I return an object, under the covers I think it's returning the memory address to that object (or an object containing the memory address) which you can reference and use. But what is actually happening when you return a func? How does your app know which instance of an object to use with that func? My instinct tells me that an object instance reference is passed along with the func but is that what is actually happening? I can't seem to find much on this topic. Edit: To clarify, I am asking when a method returns a func