Yes its a bit of a pain to do it that way if you have a large object
structure.
An alternative is to use the ISerializable interface.
Here's more info:
http://msdn.microsoft.com/library/de...classtopic.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"MrFile" <mrfile.email@gmail.com> wrote in message
news:1150404557.306716.162240@y41g2000cwy.googlegr oups.com...[color=blue]
> My company has developed a backend component which needs to be carried
> around in session state, therefore it must be marked [Serializable] at
> the class level.
>
> The problem I have with this is that now any class that this class uses
> must also be marked as serializable. This is a huge pain since now we
> have a dozen classes marked.
>
> Can someone better explain why we have to chain mark the supporting
> classes in the first place? Also, does marking all these classes have
> some sort of negative impact?
>
> My idea to get around this was to make one light-weight class (that had
> no supporting classes) and then have some sort of factory populate it,
> this would therefore only require us to mark it serializable and it
> would be our traveling container.
>
> Your feedback on this would be appreciated.
>[/color]