0

Can you use custom serialization to send System.Type with WCF?

[DataMember]
public Type DataType

I was thinking of somehow before it is sent it is converted to string with .AssemblyQualifiedName and after receiving it is converted back to Type with Type.GetType(assemblyQualifiedName).

Is that possible?

1 Answer 1

1

check Can I serialize a C# Type object?. even though Type is serializable, you could run into issues as shown in the question

you are better off passing the full name and assembly name across the wire and then recreating the Type from these 2

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.