void Write21_CiscoIPPhoneExecuteType(string n, string ns, CiscoIPPhoneExecuteType o, bool isNullable, bool needType) {
     if ((object)o == null) {
         if (isNullable) WriteNullTagLiteral(n, ns);
         return;
     }
     if (!needType) {
         System.Type t = o.GetType();
         if (t == typeof(CiscoIPPhoneExecuteType)) {
         }
         else {
             throw CreateUnknownTypeException(o);
         }
     }
     WriteStartElement(n, ns, o, false, null);
     if (needType) WriteXsiType(@"CiscoIPPhoneExecuteType", @"");
     {
         CiscoIPPhoneExecuteItemType[] a = (CiscoIPPhoneExecuteItemType[])o.@ExecuteItem;
         if (a != null) {
             for (int ia = 0; ia < a.Length; ia++) {
                 Write6_CiscoIPPhoneExecuteItemType(@"ExecuteItem", @"", ((CiscoIPPhoneExecuteItemType)a[ia]), false, false);
             }
         }
     }
     WriteEndElement(o);
 }
 CiscoIPPhoneExecuteType Read21_CiscoIPPhoneExecuteType(bool isNullable, bool checkType) {
     System.Xml.XmlQualifiedName xsiType = checkType ? GetXsiType() : null;
     bool isNull = false;
     if (isNullable) isNull = ReadNull();
     if (checkType) {
     if (xsiType == null || ((object) ((System.Xml.XmlQualifiedName)xsiType).Name == (object)id39_CiscoIPPhoneExecuteType && (object) ((System.Xml.XmlQualifiedName)xsiType).Namespace == (object)id2_Item)) {
     }
     else
         throw CreateUnknownTypeException((System.Xml.XmlQualifiedName)xsiType);
     }
     if (isNull) return null;
     CiscoIPPhoneExecuteType o;
     o = new CiscoIPPhoneExecuteType();
     CiscoIPPhoneExecuteItemType[] a_0 = null;
     int ca_0 = 0;
     bool[] paramsRead = new bool[1];
     while (Reader.MoveToNextAttribute()) {
         if (!IsXmlnsAttribute(Reader.Name)) {
             UnknownNode((object)o);
         }
     }
     Reader.MoveToElement();
     if (Reader.IsEmptyElement) {
         Reader.Skip();
         o.@ExecuteItem = (CiscoIPPhoneExecuteItemType[])ShrinkArray(a_0, ca_0, typeof(CiscoIPPhoneExecuteItemType), true);
         return o;
     }
     Reader.ReadStartElement();
     Reader.MoveToContent();
     int whileIterations4 = 0;
     int readerCount4 = ReaderCount;
     while (Reader.NodeType != System.Xml.XmlNodeType.EndElement && Reader.NodeType != System.Xml.XmlNodeType.None) {
         if (Reader.NodeType == System.Xml.XmlNodeType.Element) {
             if (((object) Reader.LocalName == (object)id40_ExecuteItem && (object) Reader.NamespaceURI == (object)id2_Item)) {
                 a_0 = (CiscoIPPhoneExecuteItemType[])EnsureArrayIndex(a_0, ca_0, typeof(CiscoIPPhoneExecuteItemType));a_0[ca_0++] = Read6_CiscoIPPhoneExecuteItemType(false, true);
             }
             else {
                 UnknownNode((object)o, @":ExecuteItem");
             }
         }
         else {
             UnknownNode((object)o, @":ExecuteItem");
         }
         Reader.MoveToContent();
         CheckReaderCount(ref whileIterations4, ref readerCount4);
     }
     o.@ExecuteItem = (CiscoIPPhoneExecuteItemType[])ShrinkArray(a_0, ca_0, typeof(CiscoIPPhoneExecuteItemType), true);
     ReadEndElement();
     return o;
 }