Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you are going to need another class to hold the 3 properties, and mark those properties with the <code>XmlAttribute</code> attribute</p> <pre><code>[Serializable] public class Name { [XmlAttribute] public string PropertyName { get; set; } [XmlAttribute] public string DisplayName { get; set; } [XmlAttribute] public int ListOrder { get; set; } } [Serializable] public class FullName { private Name strFirstName; [XmlElement("FirstName")] public Name FirstName { get { return strFirstName; } set { strFirstName = value; } } private Name strMiddleName; [XmlElement("MiddleName")] public Name MiddleName { get { return strMiddleName; } set { strMiddleName = value; } } private Name strLastName; [XmlElement("LastName")] public Name LastName { get { return strLastName; } set { strLastName = value; } } [XmlElement("ListOrder")] public int ListOrder { get; set; } } [Serializable] public class Visibility { public FullName FullName { get; set; } [XmlAttribute("DisplayName")] public String DisplayName { get; set; } } [Serializable] public class Visibilities { [XmlAttribute("AppName")] public String AppName { get; set; } [XmlElement("Visibility")] public List&lt;Visibility&gt; Visibility { get; set; } } </code></pre> <h2>Serialized:</h2> <pre><code>&lt;Visibilities&gt; &lt;Visibilities AppName="Test2"&gt; &lt;Visibility DisplayName="Full Name"&gt; &lt;FullName&gt; &lt;FirstName PropertyName="FullName.FirstName" DisplayName="First Name" ListOrder="3" /&gt; &lt;MiddleName PropertyName="FullName.MiddleName" DisplayName="Middle Name" ListOrder="3" /&gt; &lt;LastName PropertyName="FullName.LastName" DisplayName="Last Name" ListOrder="3" /&gt; &lt;ListOrder&gt;0&lt;/ListOrder&gt; &lt;/FullName&gt; &lt;/Visibility&gt; &lt;/Visibilities&gt; </code></pre> <p></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload