Specifies that the System.Xml.Serialization.XmlSerializer must serialize the class member as an encoded SOAP attribute.
See Also: SoapAttributeAttribute Members
The System.Xml.Serialization.SoapAttributeAttribute class belongs to a family of attributes that controls how the System.Xml.Serialization.XmlSerializer serializes, or deserializes, an object as encoded SOAP XML. The resulting XML conforms to section 5 of the World Wide Web Consortium (www.w3.org) document, "Simple Object Access Protocol (SOAP) 1.1". For a complete list of similar attributes, see Attributes That Control Encoded SOAP Serialization.
To serialize an object as an encoded SOAP message, you must construct the System.Xml.Serialization.XmlSerializer using an System.Xml.Serialization.XmlTypeMapping created with the SoapReflectionImporter.ImportTypeMapping(Type) method of the System.Xml.Serialization.SoapReflectionImporter class.
Apply the System.Xml.Serialization.SoapAttributeAttribute to a public field to specify that the System.Xml.Serialization.XmlSerializer serializes the field as an XML attribute. You can specify an alternative name of the attribute by setting the SoapAttributeAttribute.AttributeName property. Set the SoapAttributeAttribute.DataType if the attribute must be given a specific XML Schema definition language (XSD) data type. If the attribute belongs to a specific XML namespace, set the SoapAttributeAttribute.Namespace property.
For more information about using attributes, see Extending Metadata Using Attributes
You can use the word SoapAttribute in your code instead of the longer System.Xml.Serialization.SoapAttributeAttribute.