Returning user-defined objects from a web method

  • Thread starter Rafael Corchuelo
  • Start date
R

Rafael Corchuelo

Hello! I've created a web service that contains the following method:

[WebMethod]
public Foo Bar() {...}

Foo is a class that models simple objects with a few simple methods. The
problem is that every time I create a proxy to this web service using
"References/Add web reference", a new Foo class is created (and it contains
public fields and properties only).

Can I tell VS to download the original Foo class to the client instead of
creating a new class?

Thanks in advance,

RC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top