Assembly Seializable

  • Thread starter Thread starter shail
  • Start date Start date
How would you serialize an assembly? An assembly defines a set of types,
not a runtime grouping of those types.

Do you mean how do you mark a class as serializeable? If you want an
application "instance" serialized as a whole you do that by marking all the
classes as serializeable. Then serialize the main class instance (object)
that holds a reference to all other objects (such as an "Application"
class).

[Serializable]public class Application{...}
[Serializable]public class Document{...}
etc...

Now you need to ensure all the classes serialize properly... Basic,
Selective, or Custom. See the following link:
http://msdn.microsoft.com/library/d...-us/cpguide/html/cpconbinaryserialization.asp

Let me know if this helps.
 
shail said:
How to mark assembly serializable?
Thank You.

All assemblies (except dynamic assemblies) are serialized to disk by the
compiler as PE/COFF files. You can deserialize them with Assembly.Load().

The [Serializable] pseudo custom attribute can only be applied to a class, a
value type (struct or enum) or a delegate.

Richard
 
Back
Top