6
[ProtoContract] 
class A
{
[ProtoMember(1)]
 public B bbb
{
 get;set; //getter & setter is here
} 
}

[ProtoContract]
public class B : IData
{
///???0
[ProtoMember(1)] 
public IEnumerable <IData> subData
{
get;set; //getter & setter is here
//the setter puts some data inn structure that in fact contains List<T> plus some simple int's
}

///????
public interface  IData: Iface1
{
 ///????
 IEnumerable<Iface3> data2 {get;}
  ///????
 IEnumerable<IData> subdata{get;}
}

When I try to serialize A class object I get an error that:" No serializer defined for type: System.Collections.Generic.IEnumerable`1 [IData, namespaceMy, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]

The question is - how could I serialize and deserialize that IEnumerable?

Change IEnumerable to List<> was a bad idea(( to much code in this program awaits IEnumerable and a horde of errors raised. As fo possible duplicate - the type T was not an interface in that case

curiousity
  • 4,703
  • 8
  • 39
  • 59

0 Answers0