Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is a callback function?

Answers were Sorted based on User's Feedback



what is a callback function?..

Answer / www.lutix.com

A function that is passed (by reference) to another
function. The other function calls the callback function
under defined conditions

Is This Answer Correct ?    11 Yes 1 No

what is a callback function?..

Answer / m.shanmuga sundaram

Definition:
***********
Functions that are triggered when an associated event
happens.

example
*******

a) In C language function pointer is used as a callback
functions.

b) In C++ virtual function are used as a callback function.

c) In c# delegate keyword is used to create a call back
function.

example in c#
*************

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
public delegate int execute(int a, int
b); //declare a delegate method

static void Main(string[] args)
{
Program p = new Program();

execute ex = new execute(p.add);
Console.WriteLine(ex(2,3)); //add method is
executed

ex = new execute(p.subtract);
Console.WriteLine(ex(2, 3)); //subtract method
is executed
}

public int add(int a, int b)
{
return (a + b);
}

public int subtract(int a, int b)
{
return (a - b);
}
}
}

Is This Answer Correct ?    11 Yes 1 No

what is a callback function?..

Answer / geetha

hi Amit,

Thank you for giving Definition. Can you give some example?.

Thanks,
Geetha

Is This Answer Correct ?    2 Yes 0 No

what is a callback function?..

Answer / amit bhardwaj

one object to send message to other object is called
callback and the Methos use to call back message are known
as callback method.

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C Sharp Interview Questions

Explain the difference between abstract class and interface.

0 Answers   Accenture,


What are delegates and why are they required?

0 Answers  


What is dataadapter c#?

0 Answers  


What are the concepts of dispose method?

0 Answers  


What is Delay Signing?

1 Answers   ACS,


Does c# replace c++?

0 Answers  


What is the difference between a function and a method?

0 Answers  


What are the benefits of using the aggregate method in linq?

0 Answers  


Is c# pass by value?

0 Answers  


How to make sure custom class supports deterministic finalization?

1 Answers   IBM,


What is escape sequence in c#?

0 Answers  


What is inheritance c#?

0 Answers  


Categories