Results 1 to 2 of 2

Thread: Is XML Serialization in Mono is possible ?

  1. #1

    Unhappy Is XML Serialization in Mono is possible ?

    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 :

    /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 ?

  2. #2
    Carlos E. R. NNTP User

    Default Re: Is XML Serialization in Mono is possible ?

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

    ....
    > 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)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •