using System.Collections.Generic;
using System.Xml.Serialization;
using System.Diagnostics;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Globalization;
using System.Collections;
namespace Question42490161
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class OxFordDefinition_perGroup
private string _GroupDescField;
private string _GroupSenseField;
private string _GroupGrammerField;
return this._GroupDescField;
this._GroupDescField = value;
public string _GroupSense
return this._GroupSenseField;
this._GroupSenseField = value;
public string _GroupGrammer
return this._GroupGrammerField;
this._GroupGrammerField = value;
private List<OxFordDefinition_perGroup_perMainExample_perSubExample> _perMainExampleField;
[System.Xml.Serialization.XmlArrayItemAttribute("_perSubExample", IsNullable = false)]
public List<OxFordDefinition_perGroup_perMainExample_perSubExample> _perMainExample
return this._perMainExampleField;
this._perMainExampleField = value;
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
public partial class OxFordDefinition_perGroup
private string _GroupDescField;
private string _GroupSenseField;
private string _GroupGrammerField;
private OxFordDefinition_perGroup_perMainExample_perSubExample[] _perMainExampleField;
return this._GroupDescField;
this._GroupDescField = value;
public string _GroupSense
return this._GroupSenseField;
this._GroupSenseField = value;
public string _GroupGrammer
return this._GroupGrammerField;
this._GroupGrammerField = value;
[System.Xml.Serialization.XmlArrayItemAttribute("_perSubExample", IsNullable = false)]
public OxFordDefinition_perGroup_perMainExample_perSubExample[] _perMainExample
return this._perMainExampleField;
this._perMainExampleField = value;
public class OxFordDefinition_perGroup_perMainExample_perSubExample
internal static void Test()
var v2 = new Original.OxFordDefinition_perGroup { _perMainExample = new OxFordDefinition_perGroup_perMainExample_perSubExample[] { new OxFordDefinition_perGroup_perMainExample_perSubExample() } };
var v1 = new List.OxFordDefinition_perGroup { _perMainExample = new List<OxFordDefinition_perGroup_perMainExample_perSubExample> { new OxFordDefinition_perGroup_perMainExample_perSubExample() } };
public static void Main()
public static class XmlSerializationHelper
public static T LoadFromXml<T>(this string xmlString, XmlSerializer serial = null)
serial = serial ?? new XmlSerializer(typeof(T));
T returnValue = default(T);
using (StringReader reader = new StringReader(xmlString))
object result = serial.Deserialize(reader);
public static string GetXml<T>(this T obj, XmlSerializer serializer = null, bool omitStandardNamespaces = false)
XmlSerializerNamespaces ns = null;
if (omitStandardNamespaces)
ns = new XmlSerializerNamespaces();
using (var textWriter = new StringWriter())
var settings = new XmlWriterSettings() { Indent = true };
using (var xmlWriter = XmlWriter.Create(textWriter, settings))
(serializer ?? new XmlSerializer(obj.GetType())).Serialize(xmlWriter, obj, ns);
return textWriter.ToString();