<Serialize> what does it really mean???

  • Thread starter Thread starter serge calderara
  • Start date Start date
S

serge calderara

Dear all,

I would like toi understand clearly what does that tag
<Serialiaze> reaaly means and when to use it and how?

I have seen it in many places

thanks for your answer
regards
serge
 
Dear all,

I would like toi understand clearly what does that tag
<Serialiaze> reaaly means and when to use it and how?

I have seen it in many places

thanks for your answer
regards
serge

When something is in a tag like that before a member declaration it is
called an "attibute".

Look in the help for "SerializableAttribute" class.

"Indicates that a class can be serialized.
....
Apply the SerializableAttribute attribute to a type to indicate that
instances of this type can be serialized. The common language runtime
throws SerializationException if any type in the graph of objects being
serialized does not have the SerializableAttribute attribute applied.

Apply the SerializableAttribute attribute even if the class also
implements the ISerializable interface to control the serialization
process."

So also take a look at the ISerializable interface, and in general look
into the topic of serialization.

--
Michael Lang, MCSD
See my .NET open source projects
http://sourceforge.net/projects/colcodegen (simple code generator)
http://sourceforge.net/projects/dbobjecter (database app code generator)
http://sourceforge.net/projects/genadonet ("generic" ADO.NET)
 
basically, a serialized class can be stored in binary form. so you can save
the state of your class, stick it in a file, or the registry, or send it
across a network or whatever you want, and when your program needs it again
it can just read that binary data and have that class in it's saved state.

Chris
 
Back
Top