Posts Tagged ‘Xml Serialization’

XmlUtils - serialize/deserialize an object to/from Xml in VB.Net

Here is an implementation using VB.Net of XmlUtils class from my old post. Yesterday, I wrote an implementation of XmlConverter using VB.Net. As I wrote the idea is to provide the code in VB.Net for people that use VB.Net as their favourite programming language. Both XmlConverter and XmlUtils do the same but the second one is [...]

Serialize/Deserialize a Font and Color to/from XML

Not so long ago I needed to store some of UI appearance values of my project into a custom XML file in order to allow the end-user to configure its UI appearance. As it is expected I had to store also fonts and colors. Both of them can not be directly serialized into XML. For serializing/deserializing colors [...]

XmlConverter - serialize/deserialize an object to/from Xml in VB.Net

Here is an implementation using VB.Net of XmlConverter class from my old post. I’ll not rewrite the post but just put the code and sample of its use. The idea is to allow some VB.Net guy to use the implementation as is and not to rewrite it from C# into VB.Net. BUT Let me underline that I’ve [...]

XmlConverter - serialize/deserialize an object to/from Xml (continue)

Few days ago I wrote about a static class named XmlConverter. It contains few generic methods which allow an object to be serialized to XML or deserialized from XML. Today, I rewrite it to a XML utility class with extension methods. The following snippet contains the new class.
[sourcecode language="csharp"]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml.Serialization;
using System.Xml;
namespace XmlConverter.Utilities
{
 public static class XmlUtils
 {
  public [...]

Xml serialize and deserialize an object

Some time ago, I needed to serialize and deserialize different types of objects to/from XML. Because of that I decided to create a class with template methods to do this. The name of the class is XmlConverter (see below).

1: public static class XmlConverter

2: {

3: 

[...]