Chuck,
If a class is nested, it only means that the class is defined within
another class. This is not serialized unless the parent class holds a
reference to an instance of the nested class.
If you want to prevent a field from being serialized, then you can place
the NonSerialized attribute on the field to keep it from being serialized.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Chuck Bowling said:
When you use the [Serializable] tag are nested classes also serialized?
If so, can you just use a [NonSerialized] tag to exclude them from the
stream?