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. constructor to deserialize an object not found

constructor to deserialize an object not found

Scheduled Pinned Locked Moved C#
helpdiscussion
4 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    sameerhanda
    wrote on last edited by
    #1

    Ok, I have inhertied a some code in which I find that the previous developer has done something I do not agree with but..I have to work with what I have got. There is a typed dataset called QueryDataSet and there is an object called QueryDataObject that inherits from QueryDataSet. In the development enviorment all is well mbut when I get to my executable, I get the following error: "The constructor to deseralize an object of type WTI.Fortis.QueryDataObject was not found". I am thinking that the previous developer was changing the constructor protected QueryDataSet(SerializationInfo info, StreamingContext context) { that is genereated as a result of me autogenerating the dataset to public. Any thoughts on this matter would be greatly appreciated. Sameer

    E 1 Reply Last reply
    0
    • S sameerhanda

      Ok, I have inhertied a some code in which I find that the previous developer has done something I do not agree with but..I have to work with what I have got. There is a typed dataset called QueryDataSet and there is an object called QueryDataObject that inherits from QueryDataSet. In the development enviorment all is well mbut when I get to my executable, I get the following error: "The constructor to deseralize an object of type WTI.Fortis.QueryDataObject was not found". I am thinking that the previous developer was changing the constructor protected QueryDataSet(SerializationInfo info, StreamingContext context) { that is genereated as a result of me autogenerating the dataset to public. Any thoughts on this matter would be greatly appreciated. Sameer

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      QueryDataObject must implement ISerializable as well as QueryDataSet (I think). You might be able to get around it by casting QueryDataObject to a QueryDataSet and Deserializing that instead. I havn't used Serialization that much but I do remember coming across something along the previous lines.


      You know you're a Land Rover owner when the best route from point A to point B is through the mud. Ed

      S 1 Reply Last reply
      0
      • E Ed Poore

        QueryDataObject must implement ISerializable as well as QueryDataSet (I think). You might be able to get around it by casting QueryDataObject to a QueryDataSet and Deserializing that instead. I havn't used Serialization that much but I do remember coming across something along the previous lines.


        You know you're a Land Rover owner when the best route from point A to point B is through the mud. Ed

        S Offline
        S Offline
        sameerhanda
        wrote on last edited by
        #3

        Well the QueryDataset is a type dataset and that does not implement te ISeralizable interface by default and I am pretty positive that casting QueryDataObject to a QueryDataSet maynot by me much, but I am going to try to implement the Iseralizable interface on the QueryDataObject and see what happens.

        E 1 Reply Last reply
        0
        • S sameerhanda

          Well the QueryDataset is a type dataset and that does not implement te ISeralizable interface by default and I am pretty positive that casting QueryDataObject to a QueryDataSet maynot by me much, but I am going to try to implement the Iseralizable interface on the QueryDataObject and see what happens.

          E Offline
          E Offline
          Ed Poore
          wrote on last edited by
          #4

          Sorry I wasn't more help :sigh:


          You know you're a Land Rover owner when the best route from point A to point B is through the mud. Ed

          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