Serialization

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Arran Pearce

    Serialization

    Hi,

    I have just looked at serialization (to a file) and was surprised how easy
    it seemed to be. Are there any issues when serializing objects? or is it
    really just that easy and powerful and I am looking for problems?

    cheers for any info.

    Arran


  • Michael Giagnocavo [MVP]

    #2
    Re: Serialization

    Serialization's pretty nice. Other than that, it's pretty sweet :)
    Welcome to .NET.

    That's a simple answer, as of course, complex scenarios have many issues.
    For instance, in Dynamic Assemblies (assemblied created at runtime) it XML
    Serialization does not work. But in straight-forward scenarios, things are
    nice.

    -mike
    MVP

    "Arran Pearce" <arran.pearce@b acoll.ac.uk> wrote in message
    news:uLfHeMIqDH A.1408@TK2MSFTN GP11.phx.gbl...[color=blue]
    > Hi,
    >
    > I have just looked at serialization (to a file) and was surprised how easy
    > it seemed to be. Are there any issues when serializing objects? or is it
    > really just that easy and powerful and I am looking for problems?
    >
    > cheers for any info.
    >
    > Arran
    >
    >[/color]



    Comment

    • Arran Pearce

      #3
      Re: Serialization

      Good stuff.


      "Michael Giagnocavo [MVP]" <mggUNSPAM@Atre vido.net> wrote in message
      news:%23OKBImIq DHA.2740@TK2MSF TNGP09.phx.gbl. ..[color=blue]
      > Serialization's pretty nice. Other than that, it's pretty sweet :)
      > Welcome to .NET.
      >
      > That's a simple answer, as of course, complex scenarios have many issues.
      > For instance, in Dynamic Assemblies (assemblied created at runtime) it XML
      > Serialization does not work. But in straight-forward scenarios, things are
      > nice.
      >
      > -mike
      > MVP
      >
      > "Arran Pearce" <arran.pearce@b acoll.ac.uk> wrote in message
      > news:uLfHeMIqDH A.1408@TK2MSFTN GP11.phx.gbl...[color=green]
      > > Hi,
      > >
      > > I have just looked at serialization (to a file) and was surprised how[/color][/color]
      easy[color=blue][color=green]
      > > it seemed to be. Are there any issues when serializing objects? or is[/color][/color]
      it[color=blue][color=green]
      > > really just that easy and powerful and I am looking for problems?
      > >
      > > cheers for any info.
      > >
      > > Arran
      > >
      > >[/color]
      >
      >
      >[/color]


      Comment

      • Jay B. Harlow [MVP - Outlook]

        #4
        Re: Serialization

        Arran,
        Yes it is that simple for 99% of what you will need to do. For the other 1%
        its not that hard to add the extra support...

        In case you don't have them the following MSDN Magazine articles are useful
        for understanding Serialization.

        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.

        Find official documentation, practical know-how, and expert guidance for builders working and troubleshooting in Microsoft products.


        Hope this helps
        Jay

        "Arran Pearce" <arran.pearce@b acoll.ac.uk> wrote in message
        news:uLfHeMIqDH A.1408@TK2MSFTN GP11.phx.gbl...[color=blue]
        > Hi,
        >
        > I have just looked at serialization (to a file) and was surprised how easy
        > it seemed to be. Are there any issues when serializing objects? or is it
        > really just that easy and powerful and I am looking for problems?
        >
        > cheers for any info.
        >
        > Arran
        >
        >[/color]


        Comment

        • Eric Gunnerson [MS]

          #5
          Re: Serialization

          If you need to deserialize after modifying your objects (ie read in old
          versions), you'll want to implement custom serialization for each object (by
          implementing ISerializable) so that you have more control. If you don't do
          this, you'll be unable to read old versions.

          --
          Eric Gunnerson

          Visit the C# product team at http://www.csharp.net
          Eric's blog is at http://blogs.gotdotnet.com/ericgu/

          This posting is provided "AS IS" with no warranties, and confers no rights.
          "Arran Pearce" <arran.pearce@b acoll.ac.uk> wrote in message
          news:uLfHeMIqDH A.1408@TK2MSFTN GP11.phx.gbl...[color=blue]
          > Hi,
          >
          > I have just looked at serialization (to a file) and was surprised how easy
          > it seemed to be. Are there any issues when serializing objects? or is it
          > really just that easy and powerful and I am looking for problems?
          >
          > cheers for any info.
          >
          > Arran
          >
          >[/color]


          Comment

          Working...