public DataItem Serialize() { DataItem customField; DataItem valuesItem; customField = new DataItem(); customField.Name = "CustomFieldResponse"; customField.AddAttribute("FieldCode", this.FieldCode); valuesItem = new DataItem("Values", string.Empty); foreach (string value in this.Values) { valuesItem.AddChild("Value", value); } customField.Items.Add(valuesItem); return(customField); }