Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Deserialization question

Deserialization question

Scheduled Pinned Locked Moved C#
questionxmljsontutorial
6 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PACO77
    wrote on last edited by
    #1

    Hi, i have a little quiestion, about deserializing a custom type...I want to deserialized this custom type but actually i dont know it. What i mean is for example i have a type called TypeA - i serialized it. But when i want to deserialized i dont know what type i have at the xml file(for xml serialization). I want to find it out. Is there way to find what type i have?

    J H R 3 Replies Last reply
    0
    • P PACO77

      Hi, i have a little quiestion, about deserializing a custom type...I want to deserialized this custom type but actually i dont know it. What i mean is for example i have a type called TypeA - i serialized it. But when i want to deserialized i dont know what type i have at the xml file(for xml serialization). I want to find it out. Is there way to find what type i have?

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      One option would be to serialize as part of the object the Type's FullName. this.GetType().FullName This wont help you on "automatically" deserializing that object, but you could directly interrogate the Xml to determine what the type was of the serialized object.

      --- How to get answers to your questions[^]

      1 Reply Last reply
      0
      • P PACO77

        Hi, i have a little quiestion, about deserializing a custom type...I want to deserialized this custom type but actually i dont know it. What i mean is for example i have a type called TypeA - i serialized it. But when i want to deserialized i dont know what type i have at the xml file(for xml serialization). I want to find it out. Is there way to find what type i have?

        H Offline
        H Offline
        Harkamal Singh
        wrote on last edited by
        #3

        Sorry, I am a beginer, is there any article to understand serialization. Thanks, h.

        G 1 Reply Last reply
        0
        • H Harkamal Singh

          Sorry, I am a beginer, is there any article to understand serialization. Thanks, h.

          G Offline
          G Offline
          Giorgi Dalakishvili
          wrote on last edited by
          #4

          Yes there is. Search on codeproject

          #region signature my articles #endregion

          1 Reply Last reply
          0
          • P PACO77

            Hi, i have a little quiestion, about deserializing a custom type...I want to deserialized this custom type but actually i dont know it. What i mean is for example i have a type called TypeA - i serialized it. But when i want to deserialized i dont know what type i have at the xml file(for xml serialization). I want to find it out. Is there way to find what type i have?

            R Offline
            R Offline
            Rudolf Jan
            wrote on last edited by
            #5

            The only solution I know is to store the type during serialization. When deserializing, first deserialize the type description and deserialize the object afterwards, using a switch statement for the type to deserialize. It took me a lot of time to find out how to do it. I will write an article about this subject for codeproject. I think it may be ready somewhere next week.

            Rudolf Heijink

            P 1 Reply Last reply
            0
            • R Rudolf Jan

              The only solution I know is to store the type during serialization. When deserializing, first deserialize the type description and deserialize the object afterwards, using a switch statement for the type to deserialize. It took me a lot of time to find out how to do it. I will write an article about this subject for codeproject. I think it may be ready somewhere next week.

              Rudolf Heijink

              P Offline
              P Offline
              PACO77
              wrote on last edited by
              #6

              Thank you! It's really hard work, i couldnt found any topics about this problem. It's currious for me to see the way you do this, so i'll wait next week :) if you don't mind send me an email to pa_tcho7@yahoo.com with the link of the topic. Best Regards

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups