I have a custom collection which i want to expose from the WCF web service.
[DataContract( Name = "MyClass")]
public class MyCollection : IDisposable, List<MyClass>
{
}
When I use [DataContract( Name = "MyClass")] attribute it gives error
Type MyCollection is an invalid collection type since it has DataContractAttribute attribute.
You’ll need to use the CollectionDataContract attribute to handle this in WCF.
Marc