Click here to Skip to main content
15,898,035 members
Home / Discussions / C#
   

C#

 
GeneralRe: Posting event or invoking callbacks on main thread Pin
Jim Crafton6-Jun-08 9:12
Jim Crafton6-Jun-08 9:12 
AnswerRe: Posting event or invoking callbacks on main thread Pin
led mike6-Jun-08 4:45
led mike6-Jun-08 4:45 
GeneralRe: Posting event or invoking callbacks on main thread Pin
Jim Crafton6-Jun-08 5:29
Jim Crafton6-Jun-08 5:29 
GeneralRe: Posting event or invoking callbacks on main thread Pin
led mike6-Jun-08 6:06
led mike6-Jun-08 6:06 
GeneralRe: Posting event or invoking callbacks on main thread Pin
Jim Crafton6-Jun-08 6:12
Jim Crafton6-Jun-08 6:12 
GeneralRe: Posting event or invoking callbacks on main thread Pin
led mike6-Jun-08 8:26
led mike6-Jun-08 8:26 
GeneralRe: Posting event or invoking callbacks on main thread Pin
Jim Crafton6-Jun-08 9:15
Jim Crafton6-Jun-08 9:15 
QuestionSerialize and deserialize with extra types Pin
Eric Burns6-Jun-08 3:46
Eric Burns6-Jun-08 3:46 
I am serializing a class that has an array of type Base.

The type of each of these items is actually a subclass of Base (many different types).

To avoid requiring the Base class to know about all the subclasses, using [XmlInclude] (since this isn't an option for me since some of the subclasses are dynamically compiled and not known at compilation time), when I create the serializer, I pass an array of types like so:

XmlSerializer serial = new XmlSerializer( typeOfObjectToBeSerialized, extraTypesArray );

That works great. I can then use the same serializer to deserialize the file. Wonderful. . . .

Except . . . in practice, I'm not deserializing immediately after serializing. I wrote it out to a file because I want to save the state and be able to shut down the program, come back later and deserialize it. At that point, I no longer have that extraTypesArray, and it can't deserialize without it.

Does anybody have a clever solution to this problem? The only thing I can think to do add a load of strings to the beginning of the xml file and pull them out at the beginning, turn them into types somehow, and use them to create the serializer. But I'm hoping for something cleaner. Any ideas?
AnswerRe: Serialize and deserialize with extra types Pin
leppie6-Jun-08 4:42
leppie6-Jun-08 4:42 
QuestionHow to create notification icon (icon neer the windows clock ) in C# ? Pin
Yanshof6-Jun-08 3:21
Yanshof6-Jun-08 3:21 
AnswerRe: How to create notification icon (icon neer the windows clock ) in C# ? Pin
Gareth H6-Jun-08 3:28
Gareth H6-Jun-08 3:28 
GeneralRe: How to create notification icon (icon neer the windows clock ) in C# ? Pin
leppie6-Jun-08 4:43
leppie6-Jun-08 4:43 
GeneralRe: How to create notification icon (icon near the windows clock ) in C# ? Pin
Yanshof6-Jun-08 4:57
Yanshof6-Jun-08 4:57 
GeneralRe: How to create notification icon (icon near the windows clock ) in C# ? Pin
eggsovereasy6-Jun-08 7:14
eggsovereasy6-Jun-08 7:14 
Questionhow to convert this into c# Pin
prasadbuddhika6-Jun-08 2:50
prasadbuddhika6-Jun-08 2:50 
AnswerRe: how to convert this into c# Pin
Guffa6-Jun-08 2:54
Guffa6-Jun-08 2:54 
GeneralRe: how to convert this into c# Pin
Vasudevan Deepak Kumar6-Jun-08 3:36
Vasudevan Deepak Kumar6-Jun-08 3:36 
GeneralRe: how to convert this into c# Pin
Gareth H6-Jun-08 3:41
Gareth H6-Jun-08 3:41 
GeneralRe: how to convert this into c# Pin
Brady Kelly6-Jun-08 4:12
Brady Kelly6-Jun-08 4:12 
GeneralRe: how to convert this into c# Pin
CPallini6-Jun-08 3:49
mveCPallini6-Jun-08 3:49 
AnswerRe: how to convert this into c# Pin
Pete O'Hanlon6-Jun-08 3:49
mvePete O'Hanlon6-Jun-08 3:49 
Questionsending remainder mail at regular intervals Pin
fakeer4uever6-Jun-08 2:02
fakeer4uever6-Jun-08 2:02 
AnswerRe: sending remainder mail at regular intervals Pin
Ashfield6-Jun-08 2:27
Ashfield6-Jun-08 2:27 
AnswerRe: sending remainder mail at regular intervals Pin
Russell Jones6-Jun-08 2:52
Russell Jones6-Jun-08 2:52 
AnswerRe: sending remainder mail at regular intervals Pin
Gareth H6-Jun-08 3:20
Gareth H6-Jun-08 3:20 

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.