Table of Contents

Class DataContractAttribute

Namespace
Stride.Core
Assembly
Stride.Core.dll

Indicates that a class can be serialized.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Enum|AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
public class DataContractAttribute : Attribute
Inheritance
DataContractAttribute
Inherited Members

Constructors

DataContractAttribute()

Initializes a new instance of the DataContractAttribute class.

public DataContractAttribute()

DataContractAttribute(string)

Initializes a new instance of the DataContractAttribute class.

public DataContractAttribute(string aliasName)

Parameters

aliasName string

The type alias name when serializing to a textual format.

Properties

Alias

Gets or sets the alias name when serializing to a textual format.

public string Alias { get; }

Property Value

string

The alias name.

DefaultMemberMode

The default member mode.

public DataMemberMode DefaultMemberMode { get; set; }

Property Value

DataMemberMode

Inherited

Gets or sets a value indicating whether this DataContractAttribute is implicitly inherited by all its descendant classes.

public bool Inherited { get; set; }

Property Value

bool

true if inherited; otherwise, false.