what is the meaning of "PublicKeyToken=null is not marked as serializable." ?

  • Thread starter Thread starter Prakash
  • Start date Start date
P

Prakash

Hi Friends,

In my C# application, i have tried to serialize some structured data
using Soapformatter. While calling the serialize funciton i got the
exception message like

"mscorlib....The type <Appname>.<structurename> in Assembly <Appname>,
Version=1.0.2162.36249, Culture=neutral, PublicKeyToken=null is not
marked as serializable."

What is the meaning of the message and how can i solve this issue ?

Regards,
Prakash.
 
Prakash,

Basically, it means that the type you are trying to serialize does not
have the Serializable attribute attached to it.

Make sure all the fields are serializable types, and then attach the
Serializable attribute to your type, and you should be good to go.

Hope this helps.
 
Thanks Nicholas Paldino.. i solved my issue by putting the serializable
attribute in fornt of the class name.


Then in your signature you have put like [.net/c# MVP]... shall i know
how to get MVP ?

Regards,
Prakash.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top