Click here to Skip to main content
15,914,225 members
Home / Discussions / C#
   

C#

 
GeneralRe: loading a bitmap file Pin
yueue3-Aug-06 2:57
yueue3-Aug-06 2:57 
GeneralRobert I need some help Pin
diddy343-Aug-06 1:18
diddy343-Aug-06 1:18 
GeneralRe: Robert I need some help Pin
Christian Graus3-Aug-06 1:32
protectorChristian Graus3-Aug-06 1:32 
GeneralRe: Robert I need some help [modified] Pin
Dave Kreskowiak3-Aug-06 1:48
mveDave Kreskowiak3-Aug-06 1:48 
GeneralRe: Robert I need some help Pin
stancrm3-Aug-06 19:57
stancrm3-Aug-06 19:57 
Questionservice controller/impersonate error [modified] Pin
JakeFront3-Aug-06 0:03
professionalJakeFront3-Aug-06 0:03 
QuestionDelegates Pin
fmardani2-Aug-06 23:48
fmardani2-Aug-06 23:48 
AnswerRe: Delegates Pin
Christian Graus3-Aug-06 0:01
protectorChristian Graus3-Aug-06 0:01 
fmardani wrote:
What is the point of using delegates when you can easily call the method in the other class the normal way which is create an iinstance of the class and then call the method.


Because a delegate creates a link between classes where there often isn't one. For example, I create a form, form1. It has a modeless child, form2. I want to call a method in form1 when something happens in form2. Now, I CAN make a reference to form1 inside form2, but that's kind of ugly. Delegates are a nicer solution. Events can also be chained, so calling one event can call methods in several class instances. That's all happening for you, for free.

Every time I go back to C++, delegates are the first thing I miss. Yes, I have function pointers, but it's a lot more work.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog

GeneralRe: Delegates Pin
yueue3-Aug-06 0:32
yueue3-Aug-06 0:32 
AnswerRe: Delegates Pin
NasimKaziS3-Aug-06 1:51
NasimKaziS3-Aug-06 1:51 
QuestionExposing classes' methods/properties in Web Service [modified] Pin
impeham2-Aug-06 23:29
impeham2-Aug-06 23:29 
AnswerRe: Exposing classes' methods/properties in Web Service [modified] Pin
sundar1563-Aug-06 11:26
sundar1563-Aug-06 11:26 
GeneralRe: Exposing classes' methods/properties in Web Service Pin
impeham4-Aug-06 5:23
impeham4-Aug-06 5:23 
QuestionSysetm.Collections.Hashtable Pin
El'Cachubrey2-Aug-06 23:08
El'Cachubrey2-Aug-06 23:08 
AnswerRe: Sysetm.Collections.Hashtable Pin
Christian Graus2-Aug-06 23:10
protectorChristian Graus2-Aug-06 23:10 
GeneralRe: Sysetm.Collections.Hashtable [modified] Pin
El'Cachubrey2-Aug-06 23:21
El'Cachubrey2-Aug-06 23:21 
GeneralRe: Sysetm.Collections.Hashtable Pin
Guffa2-Aug-06 23:43
Guffa2-Aug-06 23:43 
GeneralRe: Sysetm.Collections.Hashtable [modified] Pin
El'Cachubrey2-Aug-06 23:50
El'Cachubrey2-Aug-06 23:50 
AnswerRe: Sysetm.Collections.Hashtable Pin
stancrm2-Aug-06 23:20
stancrm2-Aug-06 23:20 
GeneralRe: Sysetm.Collections.Hashtable Pin
El'Cachubrey2-Aug-06 23:22
El'Cachubrey2-Aug-06 23:22 
Questionconnection pro Pin
skyeddie2-Aug-06 23:06
skyeddie2-Aug-06 23:06 
AnswerRe: connection pro Pin
Christian Graus2-Aug-06 23:11
protectorChristian Graus2-Aug-06 23:11 
GeneralRe: connection pro Pin
skyeddie2-Aug-06 23:25
skyeddie2-Aug-06 23:25 
GeneralRe: connection pro Pin
Christian Graus2-Aug-06 23:54
protectorChristian Graus2-Aug-06 23:54 
AnswerRe: connection pro Pin
realin2-Aug-06 23:37
realin2-Aug-06 23:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.