How to make web service methods return string value in lines format?
- by Born To Learn
How to make web service methods return string value in lines format?
My web service method looks like this
[WebMethod]
public string GetSomeLines()
{
System.Text.StringBuilder builder = new StringBuilder();
builder.AppendLine("Line1.");
builder.AppendLine("Line2.");
builder.AppendLine("Line3.");
return builder.ToString();
}
But when I get the result from web browser or from delphi/c# consumer it will be like this:
Line1. Line2. Line3.
While I expect to see:
Line1.
Line2.
Line3.
I know may be returning a StringBuilder or String Array is an option here but I want to know if there is a way to make this with string result.
Thanks for your help.