i really gotta confused ..
- delegates are class or only a type. ??
- is it necessary for a delegate to be same as a function or function has to save as delegate
Please bear me i am new for .net
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.
Maybe you should take a look at http://msdn.microsoft.com/en-us/library/ms173171.aspx
Basically Delegates are very similar to function pointers. They are like placeholders for a function. So e.g. if you want to write a class which can be customized to use different kinds of sort functions, you could create a delegate and later on fill it with a certain method.