Is there a way to create web services to specify the types to use? In particular, I want to be able to use the same type on the client and server to reduce code duplication.
In a simplified example:
public class Name
{
public string FirstName {get; set;}
public string Surname { get; set; }
public override string ToString()
{
return string.Concat(FirstName, " ", Surname);
}
}
I do not want to recode the parts of the functionality in my class. Another thing is that any code that exists that manipulates this class will not work on the client side, since the client side class that was generated will be a different type.
source
share