private static XmlElementAttribute CreateElementAttribute(TypeDesc typeDesc) { XmlElementAttribute xmlElement = new XmlElementAttribute(); xmlElement.IsNullable = typeDesc.IsOptionalValue; return xmlElement; }