When applied to a collection type, enables custom specification of the collection item elements. This attribute can be applied only to types that are recognized by the DataContractSerializer as valid, serializable collections.
Namespace:
System.Runtime.Serialization
Assembly:
System.Runtime.Serialization (in System.Runtime.Serialization.dll)
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Class Or AttributeTargets.Struct, Inherited := False, _
AllowMultiple := False)> _
Public NotInheritable Class CollectionDataContractAttribute _
Inherits Attribute
Dim instance As CollectionDataContractAttribute
[AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Struct, Inherited = false,
AllowMultiple = false)]
public sealed class CollectionDataContractAttribute : Attribute
The CollectionDataContractAttribute is intended to ease interoperability when working with data from non-Windows Communication Foundation (WCF) services and to control the exact shape of serialized instances. To achieve this, the ItemName property enables you to control the names of the repeating items inside a collection.
The CollectionDataContractAttribute is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the IDictionary or the IDictionary<(Of <(TKey, TValue>)>) interface, for example, the Dictionary<(Of <(TKey, TValue>)>). Use the KeyName and ValueName properties to set custom names when using the Dictionary<(Of <(TKey, TValue>)>) class.
System..::.Object
System..::.Attribute
System.Runtime.Serialization..::.CollectionDataContractAttribute
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Reference