Is XML Serialization in Mono is possible ?

Hello World ! This is my first post to these forums.:slight_smile:

I have just installed openSUSE 11.3 and enjoy using MonoDevelop , and I tried to use XML Serialization in C# :

The Help shows the following code for XML Serialization :

C# Example

// Simple XML serialization
using System;
using System.IO;
using System.Xml.Serialization;

public class MyObject {
public int X;
public int Y;

public MyObject() {
}

public MyObject(int x, int y) {
    this.X = x;
    this.Y = y;
}    

public static void Main(string] args)
{
	MyObject o = new MyObject (5, 8);
	using (FileStream fs = new FileStream("test.xml", FileMode.Create)) {        
		XmlSerializer serializer = new XmlSerializer(typeof(MyObject));
		serializer.Serialize(fs, o);	
	}
}

}

but when tried the same code the error was ::o:O

/home//Projects/xmlTest/Main.cs(14,14): Error CS0234: The type or namespace name Xml' does not exist in the namespace System’. Are you missing an assembly reference? (CS0234) (xmlTest)

so what to do now ? :sarcastic:

On 2010-10-06 18:06, aarsh wrote:
>
> Hello World ! This is my first post to these forums.:slight_smile:

> C# Example

There is a programming forum here - you might have better luck there.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)