>>Is a Delegate in C# a callback<<
JM.. You can use a delegate in C# as a callback. The delegate in C# can
encapsulate behavior as can a function pointer in C++.
Here is an article that discusses the use of function pointers as a
callback.
http://www.cprogramming.com/tutorial...-pointers.html
Note that function pointers can encapsulate behavior.
"A function pointer is a variable that stores the address of a function
that can
later be called through that function pointer. This is useful because
functions
encapsulate behavior."
Delegates are similar to C++ function pointers and can encapsulate
behavior.
MSDN "A delegate is a type that safely encapsulates a method, similar to
a
function pointer in C and C++. Unlike C function pointers, delegates are
object-oriented, type safe, and secure."
MSDN "An interface reference or a delegate can be used by an object with
no
knowledge of the class that implements the interface or delegate
method."
So both function pointers and delegates can encapsulate behavior.
>>Also, just curious, does OOP polymorphism take over for callbacks?<<
If I have not answered this ?, please clarify.
Regards,
Jeff
*** Sent via Developersdex
http://www.developersdex.com ***