Note that there are some explanatory texts on larger screens.

plurals
  1. POCan someone help me solve this in c#
    primarykey
    data
    text
    <p>I use xsd.exe /classes cwmp-1-1.xsd to generate c# code.</p> <p>The following code is generated by the tool.</p> <pre><code>public partial class Array { [System.Xml.Serialization.XmlAnyElementAttribute()] public System.Xml.XmlElement[] Any; [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)] public string arrayType; [System.Xml.Serialization.XmlAttributeAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified)] public string offset; [System.Xml.Serialization.XmlIgnoreAttribute()] public bool offsetSpecified; [System.Xml.Serialization.XmlAttributeAttribute(DataType = "ID")] public string id; [System.Xml.Serialization.XmlAttributeAttribute(DataType = "anyURI")] public string href; [System.Xml.Serialization.XmlAnyAttributeAttribute()] public System.Xml.XmlAttribute[] AnyAttr; } public partial class EventList : Array { } public partial class EventStruct { [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public string EventCode; [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public string CommandKey; } public partial class Inform { [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public DeviceIdStruct DeviceId; [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public EventList Event; [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public uint MaxEnvelopes; [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public System.DateTime CurrentTime; [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public uint RetryCount; [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified)] public ParameterValueList ParameterList; } </code></pre> <p>and my code </p> <pre><code>Inform inform = new Inform(); inform.Event = new EventList(); EventStruct es = new EventStruct(); es.EventCode = "0 BOOTSTRAP"; es.CommandKey = ""; </code></pre> <p>My problem is how to add <code>es</code> to <code>inform.Event</code></p> <p>and how to Serializer/Deserialize class Inform.</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.
 

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