Click here to Skip to main content
15,894,460 members
Home / Discussions / C#
   

C#

 
GeneralRe: accessing variables Pin
Heath Stewart26-Jan-05 14:22
protectorHeath Stewart26-Jan-05 14:22 
GeneralCustom Column Style (Windows Forms) Pin
epinaud26-Jan-05 10:14
epinaud26-Jan-05 10:14 
GeneralRe: Custom Column Style (Windows Forms) Pin
Heath Stewart26-Jan-05 14:35
protectorHeath Stewart26-Jan-05 14:35 
GeneralProgramming crystal reportsss Pin
primomak26-Jan-05 9:39
primomak26-Jan-05 9:39 
GeneralAdding assemblies to the GAC Pin
thepersonof26-Jan-05 8:27
thepersonof26-Jan-05 8:27 
GeneralRe: Adding assemblies to the GAC Pin
Nick Parker26-Jan-05 10:15
protectorNick Parker26-Jan-05 10:15 
GeneralGeneral .Net question Pin
Yaakov Davis26-Jan-05 8:11
Yaakov Davis26-Jan-05 8:11 
GeneralRe: General .Net question Pin
Heath Stewart26-Jan-05 14:44
protectorHeath Stewart26-Jan-05 14:44 
What exactly are you asking? Do you need to store a reference to a delegate in order to remove it from a event later? If so, the answer is "no". So long as the delegate references the same method for the same instance of a class that is already added to an event (which is a MulticastDelegate), you can "new" up another one like so:
textBox1.TextChanged += new EventHandler(textBox1_TextChanged);
 
// Later that day...
 
textBox1.TextChanged -= new EventHandler(textBox1_TextChanged);
A delegate is like a managed function pointer. So long as the function pointer (the method to which the delegate points) is the same - the same method on the same instance or a static method for a class - the delegate is the same.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralBinding DB to Controls Pin
Eyal Carmi26-Jan-05 3:00
Eyal Carmi26-Jan-05 3:00 
GeneralRe: Binding DB to Controls Pin
Heath Stewart26-Jan-05 14:50
protectorHeath Stewart26-Jan-05 14:50 
GeneralProgramming crystal reportsss Pin
primomak26-Jan-05 2:03
primomak26-Jan-05 2:03 
GeneralSystem wainning sound Pin
jzb26-Jan-05 1:35
jzb26-Jan-05 1:35 
GeneralRe: System wainning sound Pin
jzb26-Jan-05 17:51
jzb26-Jan-05 17:51 
Questionhow to programe winform to surppoort multiLanguage ? Pin
Fire.Rolland.Han26-Jan-05 0:24
Fire.Rolland.Han26-Jan-05 0:24 
AnswerRe: how to programe winform to surppoort multiLanguage ? Pin
Richard Schneider26-Jan-05 0:58
Richard Schneider26-Jan-05 0:58 
GeneralRe: how to programe winform to surppoort multiLanguage ? Pin
Fire.Rolland.Han26-Jan-05 1:24
Fire.Rolland.Han26-Jan-05 1:24 
GeneralRe: how to programe winform to surppoort multiLanguage ? Pin
Richard Schneider26-Jan-05 1:41
Richard Schneider26-Jan-05 1:41 
GeneralRe: how to programe winform to surppoort multiLanguage ? Pin
Heath Stewart26-Jan-05 14:40
protectorHeath Stewart26-Jan-05 14:40 
GeneralAnother DllImport question Pin
bluish26-Jan-05 0:12
bluish26-Jan-05 0:12 
GeneralRe: Another DllImport question Pin
Corinna John26-Jan-05 1:29
Corinna John26-Jan-05 1:29 
GeneralRe: Another DllImport question Pin
bluish26-Jan-05 23:30
bluish26-Jan-05 23:30 
GeneralRe: Another DllImport question Pin
Corinna John27-Jan-05 0:55
Corinna John27-Jan-05 0:55 
GeneralRe: Another DllImport question Pin
bluish27-Jan-05 20:18
bluish27-Jan-05 20:18 
General"StatusBar" problem Pin
wk_vigorous26-Jan-05 0:05
wk_vigorous26-Jan-05 0:05 
GeneralTheme Color Scheme Colors Pin
Tom John25-Jan-05 23:56
Tom John25-Jan-05 23:56 

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.