Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
C++
[DataContract]
[KnownType(List<String^>::typeid)]
ref class MyClass
{
   [DataMember]
   public List<String^>^ _myStrings;
};

[DataContract]
[KnownType(List<MyClass^>::typeid)]
ref class NewClass
{
   [DataMember]
   public List<MyClass^>^ _myClasses;
};


this data contact is failed in WCF serialization
Anyone know about this problem??


Thanks
Posted
Updated 30-Nov-10 17:03pm
v5
Comments
Radhakrishnan G. 30-Nov-10 22:59pm    
The same question is asked in WCF message board too
Patrick Kalkman 30-Apr-11 1:47am    
Why do you use KnownType? I only use it if I specify a base class in my contract and during runtime I want to exchange a derived class. I than have to indicate that the derived class is a known type.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900