I have implemented a ToString()
override method for my class in my Webservice and I return a List<myObject>()
in a function in a consumer. If I do a .ToString()
it returns object Type. How do I tackle this in C#?
Thanks.
I have implemented a ToString()
override method for my class in my Webservice and I return a List<myObject>()
in a function in a consumer. If I do a .ToString()
it returns object Type. How do I tackle this in C#?
Thanks.
When passing objects back & forth in a webservice, it's just passing an XML representations of the public properties of that object. Any methods, overridden or not, do not come with it.
I would recommend making a StringRepresentation property that calls ToString()
public string StringRepresentation
{
get { return this.ToString(); }
set { /* Do Nothing, but there has to be a set */ }
}