using System.Diagnostics;
using System.Xml.Serialization;
public static void Main()
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="bug102159_1.xsd">
var serializer = new XmlSerializer(typeof(Root));
var instance = (Root)serializer.Deserialize(new StringReader(bug102159_1))!;
if (instance.Nms.Items.Length != 4) throw new InvalidOperationException($"Property Nms contains {instance.Nms.Items.Length} elements.");
if (instance.MyList.Items.Length != 4) throw new InvalidOperationException($"Property MyList contains {instance.MyList.Items.Length} elements.");
[XmlRootAttribute("root")]
public Nms Nms { get; set; }
public MyList MyList { get; set; }
public string[] Items { get; set; }
public string[] Items { get; set; }