Help - Serialization Problem
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi ALl, I have developed a control library, and am running into some problems with serialization. When trying to serialize one of my controls, the serializer complains when it runs into something like the following: [Serializable] public class Control { public ContextMenu {get{...} set{...}} } So, the ContextMenu class is not serializable. If I try something like this: [Serializable] public class Control { [NonSerialized] public ContextMenu {get{...} set{...}} } I will get another error that the NonSerialized attribute is only for fields or something. Apparently this only works for simple types, ie int's, strings? Is there another attribute to tell it to ignore a certain property when serializing? Thanks in advance