>FileStream stream; >XmlSerializer xml; >try >{ > stream = File.Create(saveName); > xml = new XmlSerializer(spotStarter.GetType()); > xml.Serialize(stream, spotStarter); > > Debug.WriteLine("Saved", "Queue Item: " + saveName); > llSuccess = true; >} >catch (Exception ex) >{ > Debug.WriteLine("Saving to Queue", "Error: " + ex.Message); > LogException(ex); >} >finally >{ > stream.Close(); >} >Adding a stream = null in the finally does not cause the error. Does setting it to null force a close()?