Click here to Skip to main content
15,886,830 members
Home / Discussions / C#
   

C#

 
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 
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 
Hi,

Thanks for the suggestion, someone has offered me the memento pattern before, and next time I'm implementing a feature like this I'll be sure to use it. Unfortunately I found out a bit late about this in order to use it for the current project: Should I want to convert my project to use this pattern would mean I'd have to change about 1500 base datatypes to start using it, I'm afraid I don't have the time or spirit to do so.

For now I found an ugly hack around the problem: I serialize the class and store it to a memorystream, then inmedialtely deserialize it and add it to my Collection of "undo" objects. Since the event is marked as non-serializable it gets initialized to null as soon as I deserialize it. It's a bit ugly and I still don't see why I can't just set event myEvent = null . But this performs quite well actually.

Cheers and thanks for the help!


-- modified at 10:10 Friday 25th August, 2006
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 
GeneralRe: int to String conversion Pin
Brendan Vogt27-Aug-06 20:34
Brendan Vogt27-Aug-06 20:34 
QuestionDisplay a on the datagrid [modified] Pin
Mamphekgo23-Aug-06 22:37
Mamphekgo23-Aug-06 22: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.