KnownTypeAttribute.MethodName Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets the name of a method that returns a list of types that should be recognized during serialization or deserialization.
Assembly: System.Runtime.Serialization (in System.Runtime.Serialization.dll)
Property Value
Type: System.StringThe name of the method on the type defined by the KnownTypeAttribute class.
The method must exist on the class or structure that the KnownTypeAttribute is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic IEnumerable(Of T) interface, such as the Collection(Of T) class, or an array of Type objects. The method is called once for each application domain when the data contract is loaded for the type.