I have a C # class defined as follows:
public class GenericItem<T> { public List<T> Items { get; set; } public DateTime TimeStamp { get; set; } }
I am instantiating this class on my server. Then I try to pass it through the wire through the WCF service, as shown here:
[OperationContract] public GenericItem<MyCustomType> GetResult() { GenericItem<MyCustomType> result = BuildGenericItem(); return result; }
At this point, everything compiles just fine. When I "update the service link" in my Silverlight application, recompile, I get a compile-time error similar to the following:
MyNamespace.GenericItemOfMyCustomType [optional characters] does not contain a public definition for 'GetEnumerator'
I have no idea why:
- Additional characters appear. It seems to change every time I update the service link.
- How to fix it.
What am I doing wrong?
c # wcf
Javascript developer
source share