Results 1 to 4 of 4

Thread: Serialization in .NET

  1. #1

    Serialization in .NET

    This is another doubt I have. Is it possible to store and retrieve different data types from locations in memory?

  2. #2

    Serialization in .NET

    How do you mean?

    .NET has very good built-in serialization to and from XML:
    System.Xml.Serialization.XmlSerializer

    If you want to write your own you can use reflection to enumerate and read fields from a class.
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

  3. #3

    Serialization in .NET

    Quote Originally Posted by VilleK
    How do you mean?

    .NET has very good built-in serialization to and from XML:
    System.Xml.Serialization.XmlSerializer

    If you want to write your own you can use reflection to enumerate and read fields from a class.
    Well, I think I'm looking for something like the BitConverter:

    http://msdn.microsoft.com/library/de...classtopic.asp

    I'm taking a look at it, and it doesn't have a toExtended method... Is that floating-point type not available in .NET?

    Anyway, that "reflection" concept you wrote sounds interesting, is there more information on that? Thanks!

  4. #4

    Serialization in .NET

    Quote Originally Posted by cronodragon
    Anyway, that "reflection" concept you wrote sounds interesting, is there more information on that? Thanks!
    So you want to stream to a binary format? Should be possible although I haven't tried that.

    I found this:
    System.Runtime.Serialization.Formatters.Binary Namespace
    http://msdn2.microsoft.com/en-us/lib...rs.binary.aspx
    "The System.Runtime.Serialization.Formatters.Binary namespace contains the BinaryFormatter class, which can be used to serialize and deserialize objects in binary format."

    System reflection-namespace:
    http://msdn2.microsoft.com/en-us/lib...eflection.aspx

    Also Google for "system reflection" to find articles about it.
    ZGameEditor - Develop 64kb games for Windows.
    Thrust for Vectrex - ROM-file and 6809 source code.

Bookmarks

Posting Permissions

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