I'm using System.Xml to create an XML document in C#
My question is hopefully a simple one, do I need to use the WriteEndElement to close an XML tag?
For example, I have found that the following code will compile with or without 'writer.WriteEndElement();' and produce the same XML either way, however if I put 'writer.WriteEndElement();' twice, the program throws an exception.
writer.WriteStartElement("CustomerNo");
writer.WriteString("12345");
writer.WriteEndElement();
I'm not lazy and don't mind putting this in where it needs to be if this is how it's supposed to be, I just need some guidance here.
Thanks
John