DataMember of type Type
See the question and my original answer on StackOverflowThe System.Type type cannot be serialized like that. You could add a string property, like this:
[DataContract]
public class Frame
{
[DataMember]
public string FrameName { get; set; }
[DataMember]
public string FrameTypeName
{
get
{
// or FrameType.FullName, depends on compatibility between client & server
return FrameType != null ? FrameType.AssemblyQualifiedName : null;
}
set
{
FrameType = value != null ? Type.GetType(value, true) : null;
}
}
// don't serialize this one
[IgnoreDataMember]
public Type FrameType { get; set; }
}