DataMemberAttribute Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

When applied to the member of a type, specifies that the member is part of a data contract and is serializable by the DataContractSerializer.

Inheritance Hierarchy

System. . :: . .Object
  System. . :: . .Attribute
    Ws.ServiceModel..::..DataMemberAttribute

Namespace:  Ws.ServiceModel
Assembly:  MFWsStack (in MFWsStack.dll)

Syntax

'Declaration
<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field, Inherited := False,  _
    AllowMultiple := False)> _
Public NotInheritable Class DataMemberAttribute _
    Inherits Attribute
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, Inherited = false, 
    AllowMultiple = false)]
public sealed class DataMemberAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Field, Inherited = false, 
    AllowMultiple = false)]
public ref class DataMemberAttribute sealed : public Attribute
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, Inherited = false, 
    AllowMultiple = false)>]
type DataMemberAttribute =  
    class
        inherit Attribute
    end
public final class DataMemberAttribute extends Attribute

The DataMemberAttribute type exposes the following members.

Constructors

  Name Description
Public method DataMemberAttribute Initializes a new instance of the DataMemberAttribute class.

Top

Properties

  Name Description
Public property EmitDefaultValue Gets or sets a value that specifies whether to serialize the default value for a field or property being serialized.
Public property IsAttribute Indicates whether the item is an attribute.
Public property IsNillable Indicates whether to enforce nillable schema attibute validation.
Public property IsRequired Gets or sets a value that instructs the serialization engine that the member must be present when reading or deserializing.
Public property Name Gets or sets a data member name.
Public property Order Gets or sets the order of serialization and deserialization of a member.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Ws.ServiceModel Namespace