Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: Make sure the typeparam is nullable Pin
PIEBALDconsult28-Apr-08 8:48
mvePIEBALDconsult28-Apr-08 8:48 
GeneralRe: Make sure the typeparam is nullable Pin
Hesham Amin28-Apr-08 8:52
Hesham Amin28-Apr-08 8:52 
GeneralRe: Make sure the typeparam is nullable Pin
PIEBALDconsult28-Apr-08 9:48
mvePIEBALDconsult28-Apr-08 9:48 
GeneralRe: Make sure the typeparam is nullable Pin
Jordanwb28-Apr-08 9:38
Jordanwb28-Apr-08 9:38 
QuestionHow to run bat file after installation (Setup project in c#) ? Pin
bug_aonz28-Apr-08 6:07
bug_aonz28-Apr-08 6:07 
AnswerRe: How to run bat file after installation (Setup project in c#) ? Pin
Christian Graus28-Apr-08 11:23
protectorChristian Graus28-Apr-08 11:23 
AnswerRe: How to run bat file after installation (Setup project in c#) ? Pin
mav.northwind28-Apr-08 19:52
mav.northwind28-Apr-08 19:52 
GeneralXml Serialization Pin
Lea Hayes28-Apr-08 5:48
Lea Hayes28-Apr-08 5:48 
Hi,

What is the easiest way to serialize an array of objects like the one in the following code example?

public void Test()
{
   List<object> arObject = new List<object>();
   arObject.Add(Color.Red);
   arObject.Add(Color.Green);
   arObject.Add(new string("Hello World!"));
   arObject.Add(new MyObject());

   // How to serialize to and from file here?
}</object></object>


In my program the object array represents an array of property values which could be of any time. Custom objects implement the IXmlSerializable interface, and simple types like strings appear to work fine. So far I have found problems with the low-level types like System.Drawing.Color and the like. Is there a generic way of serializing objects which do not implement the IXmlSerializable interface?

At the moment I am not using the XmlSerializer class because I need extra control over how objects are serialized. So instead I am just using the XmlWriter class.

Any help would be greatly appreciated!

Lea Hayes
GeneralRe: Xml Serialization Pin
mav.northwind28-Apr-08 19:55
mav.northwind28-Apr-08 19:55 
GeneralRe: Xml Serialization Pin
Lea Hayes29-Apr-08 2:18
Lea Hayes29-Apr-08 2:18 
GeneralRe: Xml Serialization Pin
mav.northwind29-Apr-08 20:40
mav.northwind29-Apr-08 20:40 
GeneralGridview issue Pin
Member 400849228-Apr-08 5:35
Member 400849228-Apr-08 5:35 
GeneralDatagrid row leave Event Pin
michael_jhons28-Apr-08 5:26
michael_jhons28-Apr-08 5:26 
GeneralWebBrowser Question Pin
feint28-Apr-08 5:01
feint28-Apr-08 5:01 
GeneralRe: WebBrowser Question Pin
Judah Gabriel Himango28-Apr-08 5:50
sponsorJudah Gabriel Himango28-Apr-08 5:50 
GeneralRe: WebBrowser Question Pin
Spacix One28-Apr-08 7:29
Spacix One28-Apr-08 7:29 
GeneralRe: WebBrowser Question Pin
feint28-Apr-08 22:09
feint28-Apr-08 22:09 
GeneralRe: WebBrowser Question Pin
Spacix One29-Apr-08 4:34
Spacix One29-Apr-08 4:34 
GeneralMake a CAB file for PocketPc2003 Pin
AlexB4728-Apr-08 4:04
AlexB4728-Apr-08 4:04 
GeneralRe: Make a CAB file for PocketPc2003 Pin
Zoltan Balazs28-Apr-08 4:19
Zoltan Balazs28-Apr-08 4:19 
QuestionHow to display Sunday to Saturday format value from database using Gridview Pin
bruze28-Apr-08 4:00
bruze28-Apr-08 4:00 
AnswerRe: How to display Sunday to Saturday format value from database using Gridview Pin
J a a n s28-Apr-08 4:27
professionalJ a a n s28-Apr-08 4:27 
GeneralApplication.Run() Parameter Pin
saneng28-Apr-08 3:07
saneng28-Apr-08 3:07 
GeneralApplication.Run() Pin
saneng28-Apr-08 3:06
saneng28-Apr-08 3:06 
GeneralRe: Application.Run() Pin
Giorgi Dalakishvili28-Apr-08 3:36
mentorGiorgi Dalakishvili28-Apr-08 3:36 

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.