Click here to Skip to main content
15,890,399 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# audio file Pin
lenator24-Aug-06 2:29
lenator24-Aug-06 2:29 
AnswerRe: C# audio file Pin
lenator24-Aug-06 3:35
lenator24-Aug-06 3:35 
AnswerRe: C# audio file Pin
Mohammad Hajjat24-Aug-06 4:24
Mohammad Hajjat24-Aug-06 4:24 
QuestionReg Treeview Pin
Shiv524-Aug-06 0:44
Shiv524-Aug-06 0:44 
AnswerRe: Reg Treeview Pin
Malcolm Smart24-Aug-06 1:35
Malcolm Smart24-Aug-06 1:35 
QuestionUnsubscribing all event listeners Pin
sjembek24-Aug-06 0:38
sjembek24-Aug-06 0:38 
QuestionRe: Unsubscribing all event listeners Pin
beatles169224-Aug-06 6:04
beatles169224-Aug-06 6:04 
AnswerRe: Unsubscribing all event listeners [modified] Pin
sjembek24-Aug-06 23:44
sjembek24-Aug-06 23:44 
Thx for the answer, wasn't expecting anyone to reply anymore. I've thought about that solution too, but I think there should be a more elegant way to fix the issue.

The reason I want to do this: the class concerned here contains some data that's shown and can be modified in dozens of places in my application. I've created a sort of "undo" function that saves a copy of the object to memory so that the user can "rollback" on his actions. These copies should contain only data, and shoudn't even try to fire any events. While debugging I found out that some references were left to my cloned objects, meaning the data in these clones is getting modified just as my "foreground" data. What's more, the number of cloned objects in memory could eventually be many thousands, so the performance hit for even for simply checking a flag each time isn't something I want.

Since manually disconnecting my eventlisteners is so sensitive to my own errors (code intensive) I'd like to be sure all eventlisteners get disconnected from the event. I'd expect the event itself to contain a list of references to all listeners. As I said before: How else could you check an event for null.

Suggestions are still welcome of course Smile | :)
GeneralRe: Unsubscribing all event listeners Pin
beatles169225-Aug-06 2:56
beatles169225-Aug-06 2:56 
GeneralRe: Unsubscribing all event listeners [modified] Pin
sjembek25-Aug-06 4:09
sjembek25-Aug-06 4:09 
GeneralRe: Unsubscribing all event listeners Pin
beatles169225-Aug-06 12:16
beatles169225-Aug-06 12:16 
QuestionC# and SQL server problem Pin
William Ten Broek23-Aug-06 23:49
William Ten Broek23-Aug-06 23:49 
QuestionRe: C# and SQL server problem Pin
CooperWu24-Aug-06 0:42
CooperWu24-Aug-06 0:42 
AnswerRe: C# and SQL server problem Pin
William Ten Broek24-Aug-06 11:27
William Ten Broek24-Aug-06 11:27 
GeneralRe: C# and SQL server problem [modified] Pin
CooperWu24-Aug-06 16:34
CooperWu24-Aug-06 16:34 
AnswerRe: C# and SQL server problem Pin
~~~Johnny~~~24-Aug-06 1:47
~~~Johnny~~~24-Aug-06 1:47 
Questionint to String conversion Pin
Brendan Vogt23-Aug-06 23:49
Brendan Vogt23-Aug-06 23:49 
AnswerRe: int to String conversion Pin
William Ten Broek23-Aug-06 23:55
William Ten Broek23-Aug-06 23:55 
AnswerRe: int to String conversion Pin
CooperWu23-Aug-06 23:59
CooperWu23-Aug-06 23:59 
AnswerRe: int to String conversion Pin
ayyp24-Aug-06 0:30
ayyp24-Aug-06 0:30 
AnswerRe: int to String conversion Pin
Guffa24-Aug-06 2:50
Guffa24-Aug-06 2:50 
GeneralRe: int to String conversion Pin
Brendan Vogt24-Aug-06 3:31
Brendan Vogt24-Aug-06 3:31 
GeneralRe: int to String conversion Pin
Guffa24-Aug-06 12:20
Guffa24-Aug-06 12:20 
GeneralRe: int to String conversion Pin
Brendan Vogt24-Aug-06 22:37
Brendan Vogt24-Aug-06 22:37 
AnswerRe: int to String conversion Pin
Guffa25-Aug-06 9:31
Guffa25-Aug-06 9:31 

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.