private void Write151_PropertyValue(string n, string ns, PropertyValue o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && (o.GetType() != typeof(PropertyValue)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("PropertyValue", "");
         }
         this.Write1_Object("DataObject", "", o.DataObject, false, false);
         base.WriteElementString("PropertyName", "", o.PropertyName);
         base.WriteEndElement(o);
     }
 }