i have the following class

public class User
{
    private User _createdBy;
    public User CreatedBy
    {
       get { ... }
       set { ... }
    }
}

when the webservice tries to serialize this object it gets stuck in an endless loop.

is there a better solution than marking it with the [XmlIgnoreAttribute] attribute?