![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | How to serialize the Generic collections in WCF i am having a service that need to return a generic list<> of type my custom class. but when i create client proxy, the list was treated as array. is there is any way to serailize as generic collection?? For more inforamation find the code Bellow. ================================ [serviceContract] public Interface MyService { [OperationContract] List<MyClass> GetMyClass(); } [DataContract] Public class MyClass { [Datamember] int ID; [DataMember] int Name; } The Above is my WCF Service. when i Generate Service Proxy by using Svcutil.exe, the proxy is some thing like this.... MyClass[] GetMyClass() Is there anyway serialize directly to a generic list instead of Array??? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How to serialize the Generic collections in WCF AFAIK WCF not support generics at least in current version Arkady "Ramaraju" <Ramaraju@discussions.microsoft.com> wrote in message news:64A33141-6904-4F37-8F3C-D3FA4353F774@microsoft.com... >i am having a service that need to return a generic list<> of type my >custom > class. but when i create client proxy, the list was treated as array. is > there is any way to serailize as generic collection?? > > For more inforamation find the code Bellow. > ================================ > [serviceContract] > public Interface MyService > { > > [OperationContract] > List<MyClass> GetMyClass(); > } > > [DataContract] > Public class MyClass > { > [Datamember] > int ID; > [DataMember] > int Name; > } > > > The Above is my WCF Service. when i Generate Service Proxy by using > Svcutil.exe, the proxy is some thing like this.... > > > MyClass[] GetMyClass() > > > Is there anyway serialize directly to a generic list instead of Array??? > > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| System.Collections.Generic.List<int> myList = new System.Collections.Generic.List<int>(100); | .NET General | |||
| Generics and collections | .NET General | |||
| Serialize WordPad OLE data to a file? | PowerShell | |||