![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| System.Collections.Generic.List<int> myList = new System.Collections.Generic.List<int>(100); | DR | .NET General | 1 | 04-09-2008 02:29 PM |
| Generics and collections | Martin Robins | .NET General | 8 | 04-05-2008 04:56 PM |
| can't serialize ViewPort3d child elements... | Tim Mackey | Avalon | 0 | 03-01-2007 05:53 AM |
| Serialize WordPad OLE data to a file? | =?Utf-8?B?S2Jnbw==?= | PowerShell | 0 | 07-24-2006 11:06 AM |