Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.

Locked Using Non-serializable class in serializable class

  • Friday, September 07, 2012 7:51 AM
     
     

    I came across the problem with binary serialization. I have set of serializable classes that I need to binary serialize and in each class I have private field that is marked as non-serialisable and type of this field is also non-serializable. Now when I try to serialize my classes I get exception with message "Type 'xxx' is not marked as serializable." although all the private fields that reference "xxx" are marked non-serializable. I have previously created similar seialization having non-serializable class in non-serializable field at serializable class and serialization worked.

    Does anyone know what might be the problem? I expect that if error was in my code and not in serialization, I should at least have inner exception givin me the real exception why serialization failed.