Hello World ! This is my first post to these forums.
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
/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: