private void SetConstructor(string URL, bool CleanRetrunValues, NetworkCredential CustomCredentials) { if (!URL.StartsWith("http")) URL = "http://" + URL; MyList = new _SPList.Lists(); MyList.Url = URL + "/_vti_bin/Lists.asmx"; MyList.Credentials = CustomCredentials; _DS = new DataSet(); doc = new XmlDocument(); FieldsElement = doc.CreateElement("ViewFields"); }
protected virtual void Dispose(bool disposing) { if (!_isDisposed) // only dispose once! { if (disposing) { MyList.Dispose(); _DS.Clear(); _DS.Dispose(); MyList = null; _DS = null; } // Code to dispose the un-managed resources of the class } _isDisposed = true; }