If I have a class which has a property that I wish to be serializable

public string Name
        {
            get { return name; }
            set { name = value; }           // How can this be private and be used for XML serialization?
        }

How can I prevent other classes from using the setter and only allow the built in System.Xml.Serialization serializer to use it?

public string Name {
    get { return name; }
    private set { name = value; }
}

And last I checked, serialization doesn't use set/get, it uses reflection. You'd also mark the variable name as the data member, not the property.