Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

Serialization IEnumerable in WCF

$
0
0

Hi

I Knew that when I serialize IEnumerable  in wcf is not posible since IEnumerable can't be serialized since it is a interface., so many years ago I obtained the error:

Cannot serialize member :

https://stackoverflow.com/questions/15925060/how-to-use-datamember-for-ienumerablestring-for-property-in-wcf

Now, the wcf returns an "ienumerable" and it doesn't return error..

My method is: ver()

public CompositeType1 ver()     {         return new CompositeType1 { ver = ver1() };     }     public IEnumerable<int> ver1()     {          var x = new List<int>()         {             1,             2,             3         };         return x;     }

And it returns an ienumerable without errors... I suppose that Microsoft fixed after VS 2013.


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>