KnownTypeAttribute Constructor (String)
Collapse the table of content
Expand the table of content

KnownTypeAttribute Constructor (String)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the KnownTypeAttribute class with the name of a method that returns an IEnumerable of known types.

Namespace:  System.Runtime.Serialization
Assembly:  System.Runtime.Serialization (in System.Runtime.Serialization.dll)

'Declaration
Public Sub New ( _
	methodName As String _
)

Parameters

methodName
Type: System.String
The name of the method that returns an IEnumerable of types used when serializing or deserializing data.

This constructor uses a method name that matches a method of the class. The method returns a IEnumerable(Of T) of Type objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft