A delegate in C# is like a function pointer in C or C++. A delegate is a variable that calls a method indirectly, without knowing its name. Delegates can point to static or/and member functions. It is also possible to use a multicast delegate to point to multiple functions.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
The main reason we use delegates is for use in event driven programming.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
An enterprise bean that represents persistent data maintained in a database. An entity bean can manage its own persistence or
can delegate this function to its container. An entity bean is identified by a primary key. If the container in which an
entity bean is hosted crashes, the entity bean, its primary key, and any remote references survive the crash.
Create Date
:
Tuesday, May 13, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)
Threads are lightweight programs responsible for multitasking within a single application. The System.Threading namespace provides classes to manage multithreaded applications. The simplest way to create a thread is to create a new instance of the Thread class. CLR provides ThreadStart delegate which points to a method which starts when the thread starts running. Thread myThread = new Thread (new ThreadStart(myfunc)); There are API's to join threads, suspend threads and killing threads as well.
Create Date
:
Saturday, May 10, 2008
Click here
to improve the Interview Question, Answer and other fields.
|
|
Inappropriate
|
See Answer
To Email:
Subject:
Note to go along with the question: (Optional, no
more than 1,000 characters)

Message maps are an MFC approach to windows programming. Instead of writing a WinMain () function that sends messages to your WindProc and then writing a WindProc that checks which kind of message this is and then calls another of your functions, you just write the function that will handle the message, and you add a message map to your class that says, in effect, "I will handle this sort of message." The framework handles whatever routing is required to send that message to you.A number of macros are used in message maps:- DECLARE_MESSAGE_MAP: used in the include file to declare that there will be a message map in the source file.- BEGIN MESSAGE MAP: marks the beginning of the message map in the source file.- END MESSAGE MAP: marks the end of the message map- ON_COMMAND: used to delegate the handling of a command to a function of a class.- ON_COMMAD_RANGS: used to handle a group of commands- ON_MESSAGE: used to delegate the handling of a user defined message to a function- ON_NOTIFY: used to handle the control notification message with some extra information and calls a member function of a class.
Create Date
:
Saturday, May 10, 2008
Click here
to improve the Interview Question, Answer and other fields.