Why does System.Delegate implement ISerializable?

260 Views Asked by At

If you look at the sources for System.Delegate you'll see that it implements ISerializable interface:

[Serializable, ComVisible(true), ClassInterface(ClassInterfaceType.AutoDual),__DynamicallyInvokable]
public abstract class Delegate : ICloneable, ISerializable

but the actual implementation throws an exception:

public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
{
    throw new NotSupportedException();
}

Why is ISerializable used; are there any derived types that actually do use serialization?

0

There are 0 best solutions below