System.Xml.Serialization.SoapIgnoreAttribute Class

Instructs the System.Xml.Serialization.XmlSerializer not to serialize the public field or public read/write property value.

See Also: SoapIgnoreAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter | System.AttributeTargets.ReturnValue | System.AttributeTargets.All)]
public class SoapIgnoreAttribute : Attribute

Remarks

The System.Xml.Serialization.SoapIgnoreAttribute 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 [<topic://cpconAttributesThatControlSOAPEncodedSerialization>].

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.SoapIgnoreAttribute to any class member that you want the System.Xml.Serialization.XmlSerializer to ignore when an instance of the class is serialized. For example, you may do this when the member is used to contain metadata about the object being serialized.

For more information about using attributes, see [<topic://cpconExtendingMetadataUsingAttributes>].

Note:

You can use the word SoapIgnore in your code instead of the longer System.Xml.Serialization.SoapIgnoreAttribute.

Requirements

Namespace: System.Xml.Serialization
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0