I am confused in AddressOf in c# and pointer in c++ ?
Am i right that Addressof is manage execution and pointer is unmanage execution or something else?
I am confused in AddressOf in c# and pointer in c++ ? Am i
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AddressOf is a VB operator, and doesn’t exist in C#. It creates a delegate to a procedure. The delegate can be used later to call the procedure in code that does not include the procedure’s name.
A pointer in C/C++ is a representation of an address in memory. You can create a pointer to a function and use it to call that function, so in that particular case pointers and delegates behave similarly. However, delegates are not simply function pointers. The most important difference is that delegates can be chained, and call more than one procedure at once.