Click here to Skip to main content
15,908,172 members
Home / Discussions / C#
   

C#

 
QuestionUnregistering Events Pin
Member 419713614-Oct-08 22:25
Member 419713614-Oct-08 22:25 
AnswerRe: Unregistering Events Pin
Eduard Keilholz14-Oct-08 22:39
Eduard Keilholz14-Oct-08 22:39 
You simply unregister for an event if you don't want to respond to that event anymore, however you want to keep the object which fires the event intact.

If that object implements the IDisposable interface, and you call the dispose method() you obviously don't need the object anymore. You don't need to unregister events here...

A good example, I have an object which downloads files from the internet. This proces runs on the background. However, when the user opens a dialog box which displays download progress, I register to a DownloadProgressChanged event, and unregister for the event when that dialog closes. The object which performs the download must stay intact.

.: I love it when a plan comes together :.
http://www.zonderpunt.nl

AnswerRe: Unregistering Events Pin
Simon P Stevens14-Oct-08 22:47
Simon P Stevens14-Oct-08 22:47 
GeneralRe: Unregistering Events Pin
Member 419713614-Oct-08 23:35
Member 419713614-Oct-08 23:35 
GeneralRe: Unregistering Events Pin
Simon P Stevens15-Oct-08 0:38
Simon P Stevens15-Oct-08 0:38 
GeneralRe: Unregistering Events Pin
Member 419713615-Oct-08 0:51
Member 419713615-Oct-08 0:51 
QuestionHow to connect webservice through provided WSDL and proxy class Pin
shames(Sam)14-Oct-08 22:19
shames(Sam)14-Oct-08 22:19 
AnswerRe: How to connect webservice through provided WSDL and proxy class Pin
leppie15-Oct-08 1:49
leppie15-Oct-08 1:49 
AnswerRe: How to connect webservice through provided WSDL and proxy class Pin
leppie15-Oct-08 1:52
leppie15-Oct-08 1:52 
GeneralRe: How to connect webservice through provided WSDL and proxy class Pin
shames(Sam)15-Oct-08 3:27
shames(Sam)15-Oct-08 3:27 
Questionmerged cell aoto fit in c# [modified] Pin
Nilish14-Oct-08 22:06
Nilish14-Oct-08 22:06 
AnswerRe: merged cell aoto fit in c# Pin
Mycroft Holmes14-Oct-08 22:18
professionalMycroft Holmes14-Oct-08 22:18 
GeneralRe: merged cell aoto fit in c# Pin
Nilish14-Oct-08 23:01
Nilish14-Oct-08 23:01 
QuestionValidators are not working in Iframe Pin
MAT100314-Oct-08 21:29
MAT100314-Oct-08 21:29 
AnswerRe: Validators are not working in Iframe Pin
leppie14-Oct-08 21:40
leppie14-Oct-08 21:40 
GeneralRe: Validators are not working in Iframe Pin
MAT100314-Oct-08 21:56
MAT100314-Oct-08 21:56 
GeneralRe: Validators are not working in Iframe Pin
leppie14-Oct-08 22:05
leppie14-Oct-08 22:05 
QuestionC in .Net returning C1004: unexpected end of file found Pin
Member 560524014-Oct-08 21:12
Member 560524014-Oct-08 21:12 
AnswerRe: C in .Net returning C1004: unexpected end of file found Pin
leppie14-Oct-08 21:38
leppie14-Oct-08 21:38 
QuestionHow to set font Roman 10cpi in Crystal Reports Pin
Rajesh.prajapat14-Oct-08 20:13
Rajesh.prajapat14-Oct-08 20:13 
Questionsession in asp.net & c#.net Pin
kamalesh574314-Oct-08 19:48
kamalesh574314-Oct-08 19:48 
AnswerRe: session in asp.net & c#.net Pin
Eduard Keilholz14-Oct-08 20:01
Eduard Keilholz14-Oct-08 20:01 
GeneralRe: session in asp.net & c#.net Pin
kamalesh574314-Oct-08 20:53
kamalesh574314-Oct-08 20:53 
GeneralRe: session in asp.net & c#.net Pin
Mycroft Holmes14-Oct-08 22:09
professionalMycroft Holmes14-Oct-08 22:09 
AnswerRe: session in asp.net & c#.net Pin
Jaffer Mumtaz14-Oct-08 20:30
Jaffer Mumtaz14-Oct-08 20:30 

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.