.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> .NET Framework >> Post New QuestionBookmark and Share Subscribe to Forum

what is CALLBACK mean in .net

Posted By: RASHMI KUSHWAHA     Posted Date: July 11, 2011    Points:5   Category :.NET Framework
what is CALLBACK mean in .net Framework? Please help me.

Responses
Author: Ravi Ranjan Kumar             
Posted Date: July 11, 2011     Points: 20   

A callback is a reference to executable code, or a piece of executable code, that is passed as an argument to other code. This allows a lower-level software layer to call a subroutine (or function) defined in a higher-level layer.
If you're used to function pointers in C, a delegate is basically a pair of pointers rolled into one:

* A pointer to an object (optional)
* A pointer to a method of that object

That means a single delegate passes all the information needed to locate a function in your program, whether it's a static method or associated with an object.

You define them like this in C#:
code]public delegate void FooCallbackType( int a, int b, int c );

Read given article which will deal a lots
http://www.dotnetscraps.com/dotnetscraps/post/Explaining-Delegates-in-C.aspx

Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com
Author: Ravi Ranjan Kumar             
Posted Date: July 11, 2011     Points: 20   

In addition to my previous answer

A Callback functions are certainly one of the most useful programming mechanisms ever created. The C runtime's qsort function takes a callback function to sort elements within an array. In Windows, callback functions are required for window procedures, hook procedures, asynchronous procedure calls, and more. In the Microsoft® .NET Framework, callback methods are used for a whole slew of things. You can register callback methods to get assembly load/unload notifications, unhandled exception notifications, database/window state change notifications, file system change notifications, menu item selections, completed asynchronous operation notifications, filtering a set of items, and so on.


Thanks & Regards
Ravi Ranjan Kumar
http://raviranjankr.wordpress.com
Author: kamlesh             
Posted Date: July 12, 2011     Points: 20   

http://en.csharp-online.net/Delegates_and_Events%E2%80%94Callback_Methods

Thanks And Regards.
Kamlesh Nikam
Author: Narayanan             
Posted Date: August 29, 2011     Points: 20   

Hi,
http://msdn.microsoft.com/en-us/library/d186xcf0%28v=vs.71%29.aspx

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Narayanan             
Posted Date: August 29, 2011     Points: 20   

Hi,
http://msdn.microsoft.com/en-us/library/d186xcf0%28v=vs.71%29.aspx

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend