I have 2 interfaces IA and IB.
public interface IA
{
IB InterfaceB { get; set; }
}
public interface IB
{
IA InterfaceA { get; set; }
void Set
In return for your question: two other questions. What do you Serialize? Is the database reference-aware?
You don't serialize interfaces; you serialize objects. The object you serialize is either an implementation of IA or IB.
It's up to the serialized object to decide whether one of it's properties should be serialized or not. If the property does need serializing, it should implement the Serializable interface.
You can only serialize a so called 'island' formed by a circular reference A <-> B if the database can identify the serialized objects: it should first 'allocate' space for A, start serializing A's properties. When it arrives at B, it will find one of it's properties referring to A. The serialization should then include a reference to the serialized version of A.
It's much like two acquaintances moving houses at the same time: first they will exchange their future adresses, only then they will physically move.