Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Serializing a derived class

Reply
Thread Tools

Serializing a derived class

 
 
deja@2bytes.co.uk
Guest
Posts: n/a
 
      09-12-2006
hi,

I have a web service that builds an arraylist of objects. These objects
are derived classes of a base class with a few extra fields for help
with processing. But when I return the objects I only want to return
the base class implementation i.e

public class ServiceObject : BaseObject
{
public string helper1;
public string helper2;
public string helper3;
}

When the arraylist is returned, I want the client to see a bunch of
BaseObject objects NOT a bunch of ServiceObject objects. What is the
easiest way of doing this? I thought I could probably use some
serialization instructions but I'm not 100% sure on how to do it.

thanks
Phil

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Derived Structure in Derived Class?? David C++ 3 01-29-2008 07:38 AM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 01:44 PM
Derived::Derived(const Base&) developereo@hotmail.com C++ 4 05-23-2007 09:32 AM
Derived::Derived(const Base&) and Derived& operator=(const Base&) developereo@hotmail.com C++ 1 05-23-2007 12:07 AM
Serializing classes derived from dataset Aidan Glendye ASP .Net 1 07-28-2003 02:29 PM



Advertisments