Why does overwriting an XML file create an extra end tag?
问题 I am creating an application in C# that has to write some user settings to an XML file. They are read perfectly fine, but when I try to write them back they create an extra end tag that the program cannot read. XML file: <?xml version="1.0" encoding="utf-8" ?> <options> <fullscreen>False</fullscreen> <resolutionX>1280</resolutionX> <resolutionY>720</resolutionY> <vsync>True</vsync> <AA>2</AA> <musicvolume>0</musicvolume> <soundvolume>0</soundvolume> </options> Code that writes: FileStream