0

I have a dataset in my hand with one table only and I want to write it to the current xml file. When I write it, it creates a new table and add it to it instead of overwritting. everytime I write it, It multiples the number of tables by 2.

Globals.ds.WriteXml(Application.StartupPath + "\\Settings.xml");

How do I overwrite to the same xml file to save the parameters?

Cem
  • 1
  • Use other overloads of WriteXml method e.g. the one with FileStream. This way you have control over how that file gets created. – cly Nov 17 '21 at 14:43
  • I tried with all other overload methods with different parameters. I used Stream and FileStream also. – Cem Nov 17 '21 at 14:48
  • I think there was a bug in .NET Framework about this because I moved another xml file name "Setting - Copy.xml" and It works proparly now. So it seems to be a bug. – Cem Nov 17 '21 at 15:15

0 Answers0