如何使用 xmlserializer 序列化此名称列表?

How do I serialize this list of names with xmlserializer?

拿这个样本 XML:

<Teaching StudyPoint="0" Description="xx" OtherDiscussionVideo="True" VideoAfterStudentItem="False">
    <Theme>Test 1</Theme>
    <SourceMaterial>Material 1</SourceMaterial>
    <Names>
        <Name Class="2">a</Name>
        <Name Class="3">b</Name>
        <Name Class="1">b</Name>
    </Names>
</Teaching>

到目前为止,我已经设法创建这个 class 用于序列化:

namespace OutlookCalIFConsole.MWBData
{
    public class Teaching
    {
        [XmlAttribute]
        public int StudyPoint
        {
            get => _StudyPoint; set => _StudyPoint = value;
        }
        private int _StudyPoint;

        [XmlAttribute]
        public string Description
        {
            get => _Description; set => _Description = value;
        }
        private string _Description;

        [XmlAttribute]
        public bool OtherDiscussionVideo
        {
            get => _OtherDiscussionVideo; set => _OtherDiscussionVideo = value;
        }
        private bool _OtherDiscussionVideo;


        [XmlAttribute]
        public bool VideoAfterStudentItem
        {
            get => _VideoAfterStudentItem; set => _VideoAfterStudentItem = value;
        }
        private bool _VideoAfterStudentItem;

        public string Theme
        {
            get => _Theme; set => _Theme = value;
        }
        private string _Theme;

        public string SourceMaterial
        {
            get => _SourceMaterial; set => _SourceMaterial = value;
        }
        private string _SourceMaterial;

        public Teaching()
        {
            _OtherDiscussionVideo = false;
            _VideoAfterStudentItem = false;
            _StudyPoint = 0;
            _Description = "";
            _Theme = "";
            _SourceMaterial = "";
        }
    }
}

如何序列化 Name 个值的列表?

尝试在 Teaching class 内关注:

public class Teaching {
    [XmlArrayItem("Name")]
    public Name[] Names;
}