Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - How to serialize the Generic collections in WCF

 
 
Old 07-26-2006   #1 (permalink)
=?Utf-8?B?UmFtYXJhanU=?=


 
 

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 SpecsSystem Spec
Old 07-26-2006   #2 (permalink)
Arkady Frenkel


 
 

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 SpecsSystem Spec
 

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


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46