Share Link
Copied to clipboard
Embed on Your Page
Copied to clipboard
We Stand with Ukraine
[Fork] https://stackoverflow.com/questions/73127531/how-to-add-a-new-node-to-an-existing-xml-using-c-sharp by dbc_MinLength
Environment version: .NET 9.0.0 (9.0.0)

Deserialized {0} and re-serialized with following XML:
<?xml version="1.0" encoding="utf-16"?>
<Root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <ContainerType>
    <objinfo>
      <element1>old1</element1>
      <element2>old2</element2>
    </objinfo>
    <newobject>
      <element3>old3</element3>
      <element4>old4</element4>
    </newobject>
  </ContainerType>
</Root>
Cached Result
Last Run: 5:18:14 am
Compile: 0.035s
Execute: 0.12s
Memory: 14.22Mb
CPU: 0.155s