Hi, I have a similar problem where rodmcleay's solution is no good.
For simplicity, say I have a very simple classlib (Common) that is used on both the client side and the server side of a web service.
namespace Common
{
class Person
{
public string firstName, lastName;
// FullName represents functionality used on both sides
public string FullName {
get { return firstName + " " + lastName; }
}
}
}
This class is used as parameters for a web service.
How do I get both sides to use the same type without having to cast?
I have done some research and only found "crappy" solutions to the problem.
The WebServiceBinding attribute looks promising, but I have not found any way to keep the classes I use in my web service from being replicated in the auto generated References.cs.
It's very easy to edit the References.cs-file manually to make it fit my classes. However, I am lazy and would like to not have to edit the References file every time I change the web service interface.
Any bright Ideas?
(
Best regards,
Torbjorn
|