[Mono-list] ISerializable

einKI.ml einKI.ml at gmx.net
Mon Aug 21 18:14:50 EDT 2006


Hi

I tried to serialize a class with the ISerializable interface bacause I
one member of the class is a Gdk.Pixbuf which is not serializable by
default.

[Serializable]
public class ContentImage : ISerializable
{
	[NonSerialized]
	Gdk.Pixpuf image;

	protected SerializablePixbuf(SerializationInfo info,
				     StreamingContext context) 
	{
		....
	}
	
	public void GetObjectData(SerializationInfo info,
				  StreamingContext context)
	{
		....
	}
}

But I get a exception that Gdk.Pixbuf is not marked with the
Serializable Attribute.
But it should not be serialized because I should have the full
control with the ISerializable interface and further more it
is marked as NonSerialized.

Any solution is appreciated
thx



More information about the Mono-list mailing list