Click here to Skip to main content
15,918,706 members
Home / Discussions / C#
   

C#

 
GeneralRe: need help... Listview drag drop algorithm? Pin
azusakt21-Oct-03 22:20
azusakt21-Oct-03 22:20 
GeneralRe: need help... Listview drag drop algorithm? Pin
Heath Stewart22-Oct-03 2:45
protectorHeath Stewart22-Oct-03 2:45 
QuestionCan it be done? Pin
kbilly19-Oct-03 21:06
kbilly19-Oct-03 21:06 
AnswerRe: Can it be done? Pin
Daniel Turini19-Oct-03 21:25
Daniel Turini19-Oct-03 21:25 
GeneralRe: Can it be done? Pin
kbilly19-Oct-03 21:30
kbilly19-Oct-03 21:30 
GeneralRe: Can it be done? Pin
Nick Parker20-Oct-03 5:47
protectorNick Parker20-Oct-03 5:47 
Generalflabberghasted by events Pin
allancto19-Oct-03 18:45
allancto19-Oct-03 18:45 
GeneralRe: flabberghasted by events Pin
Heath Stewart20-Oct-03 5:50
protectorHeath Stewart20-Oct-03 5:50 
You should check-out MSDN for this: http://msdn.microsoft.com/library/en-us/cpguide/html/cpconevents.asp[^]

Essentially, as is common in COM and other platforms as well, think of an event as a collection of delegates (managed function pointers). For this reason, you use incremental (+=) and decremental (-=) assignment operators like all the examples use in the .NET Framework SDK documentation.

You can't directly assign (=) your event handler to another class's event. That's why your getting the compiler error when you're doing it to another class and not your own (this). You should be doing it to your own event anyway. Events are actually based on MulticastDelegate derivatives, because when you use the delegate keyword, it will actually derive from MulticastDelegate. See the docs for details.

In comparison, you can use delegates as callback functions throughout your app, but events really aren't callbacks. As I said before, they're more like a collection of callbacks.

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
QuestionHow can I repait the Caption area? Pin
wangier19-Oct-03 17:26
wangier19-Oct-03 17:26 
AnswerRe: How can I repait the Caption area? Pin
J. Dunlap19-Oct-03 17:29
J. Dunlap19-Oct-03 17:29 
GeneralMessage Removed Pin
19-Oct-03 17:18
Konstantin Gross19-Oct-03 17:18 
GeneralRe: Internet Update Program Pin
Heath Stewart20-Oct-03 5:45
protectorHeath Stewart20-Oct-03 5:45 
QuestionHow to free a dll in C#? Pin
andyniyong19-Oct-03 16:01
andyniyong19-Oct-03 16:01 
AnswerRe: How to free a dll in C#? Pin
Guillermo Rivero19-Oct-03 16:52
Guillermo Rivero19-Oct-03 16:52 
GeneralDesignable Component Pin
Eric Lacroix19-Oct-03 15:55
Eric Lacroix19-Oct-03 15:55 
GeneralWatching a variable for changes Pin
Den2Fly19-Oct-03 12:10
Den2Fly19-Oct-03 12:10 
GeneralRe: Watching a variable for changes Pin
Edbert P19-Oct-03 13:07
Edbert P19-Oct-03 13:07 
GeneralRe: Watching a variable for changes Pin
Den2Fly19-Oct-03 23:31
Den2Fly19-Oct-03 23:31 
GeneralRe: Watching a variable for changes Pin
Den2Fly19-Oct-03 23:37
Den2Fly19-Oct-03 23:37 
GeneralRe: Watching a variable for changes Pin
allancto19-Oct-03 13:21
allancto19-Oct-03 13:21 
GeneralRe: Watching a variable for changes Pin
Den2Fly19-Oct-03 22:59
Den2Fly19-Oct-03 22:59 
GeneralDecompiler for c# Pin
19-Oct-03 10:23
suss19-Oct-03 10:23 
GeneralRe: Decompiler for c# Pin
Nick Parker19-Oct-03 10:40
protectorNick Parker19-Oct-03 10:40 
GeneralRe: Decompiler for c# Pin
J. Dunlap19-Oct-03 10:41
J. Dunlap19-Oct-03 10:41 
GeneralRe: Decompiler for c# Pin
J. Dunlap19-Oct-03 10:50
J. Dunlap19-Oct-03 10:50 

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.