I’m somewhat new to using XML in my files and wanted to serialize and then de-serialize an object. The object contained a pair of string, an int, and then two int[] arrays. serializing with XmlSerializer went fine with the generated XML looking like this:
<?xml version="1.0" encoding="utf-16"?>
<Harvey xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Carl</Name>
<Ch>KNV</Ch>
<Tn>40</Tn>
<APoints>
<int>8</int>
<int>20</int>
<int>16</int>
<int>16</int>
<int>12</int>
<int>12</int>
<int>16</int>
<int>16</int>
<int>4</int>
<int>4</int>
<int>4</int>
</APoints>
<SPoints>
<int>3</int>
<int>12</int>
<int>10</int>
<int>10</int>
<int>6</int>
<int>6</int>
<int>10</int>
<int>10</int>
</SPoints>
</Harvey>
The problem is trying to load the int[] values back into their arrays. I haven’t been able to figure out how to tell the application that I want to load all the Apoints into an int[] array. I suspect the solution is really simple, but I just haven’t been able to figure it out.
As easy as