evildictaitor wrote:

AndyC wrote:

Ion Todirel wrote:

evildictaitor wrote:


*void.

good answer, you're hired


Not really, delegates are more than just function pointers. They offer type safety and security as they always point to a method, which a *void may well not do.


The type-safety is only at compile time (for non .NET languages), so actually what a delegate is is a *void.

Even in .NET it's just a typedef wrapper on a System.IntPtr.


NO! A delegate is a tiny object that captures any variables in scope at the definition (that are also used in the definition). It's NOT anywhere close to a function pointer, it's more like a quick one-off class with a single method.