Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Indigo

How to serialize the Generic collections in WCF

Update your Vista Drivers Update Your Drivers Now!!
 
 
Thread Tools Display Modes
Old 07-26-2006   #1 (permalink)
=?Utf-8?B?UmFtYXJhanU=?=
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 SpecsSystem Spec
Old 07-26-2006   #2 (permalink)
Arkady Frenkel
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 SpecsSystem Spec
 

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


Vistax64.com 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 2005-2008

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 47 48 49 50 51